fail-safe CLI exit codes: unknown verb → 1, logical failure → 10, paused → 3 - #23
Merged
Merged
Conversation
…paused) Unknown top-level verb exits 1 with a usage hint (was: help + 0, silent false success). Agent child failure maps to 10, signal to 130. Workflow terminal status maps to COMPLETED=0, PAUSED=3, FAILED=10, ABORTED/hard-errors=1. Pure classifiers in src/exit-codes.mjs; 12-test contract in tests/cli-failsafe.test.mjs (RED pre-fix). Lane contract: paused exits 3 so the Argo retry expression 'asInt(lastRetry.exitCode) != 10 && asInt(lastRetry.exitCode) != 3' excludes it. Closes #22.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #22. Agent-authored (factory-mission run
mission-adlc-cli-22-20260930); human merge only — do not auto-merge.What
src/exit-codes.mjs(new, pure):classifyAgentExit(signal→130, 0→0, else→10),classifyWorkflowStatus(COMPLETED→0, PAUSED→3, FAILED→10, ABORTED→1, unknown→1).src/dispatch.mjs: unknown top-level verb → stderr + usage + exit 1 in both trees; bare/helpstay 0.src/commands/agent.mjs: post-spawn return classified (pre-spawn validation still 1;runalias inherits).src/commands/workflow.mjs: run + resume terminal mapping classified, with lane-contract comment (asInt(lastRetry.exitCode) != 10 && asInt(lastRetry.exitCode) != 3).tests/cli-failsafe.test.mjs(new, 12 tests): RED observed pre-fix (9 fail), GREEN post-fix.Verification
npm test318/318, 34 suites, 0 regressions.run-without-prompt→1.Out of scope (tracked elsewhere)