Repository navigation
feat(#582): support exit code 78 as neutral pre-script skip - #5961
Conversation
|
🤖 Finished Review · ✅ Success · Started 10:16 PM UTC · Completed 10:31 PM UTC |
Site previewPreview: https://17e4801d-site.fullsend-ai.workers.dev Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ReviewFindingsLow
Labels: PR adds new user-facing feature (exit code 78 pre-script skip) in the harness CLI runtime Previous runReviewFindingsLow
Previous run (2)ReviewFindingsMedium
Low
Previous run (3)ReviewFindingsLow
Labels: PR modifies pre-script handling in the harness runtime (internal/cli/run.go, internal/prescript/) and adds a new feature |
3fd6517 to
091a552
Compare
|
🤖 Review · Commit: |
|
Addressed both findings in 4a5a285:
|
|
🤖 Review · Commit: |
4a5a285 to
0c62270
Compare
|
🤖 Finished Review · ✅ Success · Started 12:26 AM UTC · Completed 12:42 AM UTC Commit: |
|
Addressed all three findings from the re-review in bee05d6:
|
|
🤖 Finished Review · ✅ Success · Started 12:50 AM UTC · Completed 1:05 AM UTC Commit: |
|
Addressed both new findings from round 3 in f2fafb2:
The re-raised [incomplete-specification], [incomplete-feature-documentation] (customizing-agents.md, architecture.md) findings were already addressed in bee05d6. |
|
🤖 Review · Commit: |
Pre-scripts can now signal "nothing to do" by exiting with code 78 (the CI convention for neutral). When fullsend run sees this exit code it skips sandbox creation and LLM invocation, reports a skipped status, and exits 0 — avoiding both the cost of a no-op agent run and the noise of a false failure. Exit 78 is complementary to the existing file-based skip protocol (skipped=true in FULLSEND_PRESCRIPT_OUTPUT). Either mechanism alone is sufficient. When both are present, exit 78 is authoritative. The output file is still parsed best-effort on exit 78 for reason and other outputs. When no reason key is found, the last non-empty line of the script's stdout becomes the skip reason, enabling simple scripts like: echo "No issues need scoring" && exit 78 Other non-zero exit codes remain hard failures (unchanged). Closes #582
Address review findings: add a test covering exit 78 when the pre-script deletes the output file (documenting the intentional difference from exit 0), and note in the normative spec's Versioning section that exit code semantics are part of the v1 protocol surface. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Marta Anon <manon@redhat.com>
Strip control characters and cap stdout-derived reasons at 1024 bytes, matching the file-based value validation. Document the constraints in the normative spec. Add exit 78 mentions to customizing-agents.md and architecture.md so users can discover the simpler skip mechanism. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Marta Anon <manon@redhat.com>
…ernals Fix UTF-8 truncation in lastNonEmptyLine: back off from the 1024-byte cut point to a valid rune boundary so multi-byte characters are not split. Update the CLI internals diagram to mention exit 78 alongside skipped=true. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Marta Anon <manon@redhat.com>
f2fafb2 to
a0e7a02
Compare
|
🤖 Finished Review · ✅ Success · Started 1:14 AM UTC · Completed 1:31 AM UTC Commit: |
|
🤖 Finished Retro · ❌ Failure · Started 2:01 AM UTC · Completed 2:03 AM UTC Commit: |
Summary
fullsend run, so pre-scripts can signal "nothing to do, skip cleanly" without using the file-based output protocolreasonand other outputs; when no file reason exists, the last non-empty stdout line becomes the skip reasonChanged files
internal/prescript/prescript.go— addExitCodeNeutral = 78constantinternal/cli/run.go— detect exit 78 inrunPreScript(), capture stdout for fallback reason, addlastNonEmptyLine()helperinternal/cli/prescript_run_test.go— 10 new tests covering exit 78 behavior (stdout reason, file reason, override of skipped=false, malformed file tolerance, relay, regression guard for other exit codes)docs/normative/prescript-output/v1/README.md— document exit code 78 semantics in the normative specdocs/guides/user/building-custom-agents.md— add user-facing documentation with usage exampleTesting
-raceinternal/prescriptpackage tests passgo vetclean on both changed packagesNote
Pre-commit could not run in sandbox (network access denied for hook installation). The post-script runs an authoritative pre-commit check on the runner.
Closes #582
Post-script verification
agent/582-prescript-neutral-exit-code)2c340de079acaf412144c5b421630f63b7511c71..HEAD)