feat(FN-1062): fix step status tracking and expose step session settings in CLI

- Fix step status not being tracked correctly in executor callbacks (done/skipped were not updated)
- Expose runStepsInNewSessions and maxParallelSteps settings in CLI settings command
- Add AGENTS.md documentation for runStepsInNewSessions and maxParallelSteps settings
- Add changeset for the published CLI package
- Add tests for CLI settings validation and executor step status tracking
This commit is contained in:
gsxdsm
2026-04-07 13:41:12 -07:00
parent 647d284363
commit a716605747
6 changed files with 202 additions and 1 deletions

View File

@@ -755,9 +755,23 @@ export class TaskExecutor {
stuckTaskDetector: this.options.stuckTaskDetector,
onStepStart: (stepIndex) => {
this.options.stuckTaskDetector?.recordProgress(task.id);
try {
this.store.updateStep(task.id, stepIndex, "in-progress").catch((err) => {
executorLog.warn(`${task.id}: failed to update step ${stepIndex} status to in-progress: ${err}`);
});
} catch (err) {
executorLog.warn(`${task.id}: failed to update step ${stepIndex} status to in-progress: ${err}`);
}
},
onStepComplete: (stepIndex, result) => {
executorLog.log(`${task.id}: step ${stepIndex} ${result.success ? "succeeded" : "failed"} (${result.retries} retries)`);
try {
this.store.updateStep(task.id, stepIndex, result.success ? "done" : "skipped").catch((err) => {
executorLog.warn(`${task.id}: failed to update step ${stepIndex} status: ${err}`);
});
} catch (err) {
executorLog.warn(`${task.id}: failed to update step ${stepIndex} status: ${err}`);
}
},
});
this.activeStepExecutors.set(task.id, stepExecutor);