Skip to content

fix: classify abandoned reclaim guard as locked-family exit 5 - #197

Merged
andyrewlee merged 1 commit into
mainfrom
advisor/024-reclaim-guard-exit-code
Sep 28, 2026
Merged

andyrewlee merged 1 commit into
mainfrom
advisor/024-reclaim-guard-exit-code

Conversation

@andyrewlee

Copy link
Copy Markdown
Owner

Summary

  • An abandoned lock.reclaim guard previously fell through to exit 1 despite docs claiming exit 70. It now maps to exit 5 (the lock family) under a new sentinel ErrReclaimGuardAbandoned and a distinct JSON code locked_guard, so retry-on-locked agents can distinguish "retry" from "operator action" without parsing the message.
  • Docs corrected in docs/AGENT.md (exit table, code list, retry-idiom note), CONTRIBUTING.md (troubleshooting), and CHANGELOG.md (the original entry's claim).
  • Regression coverage: errors.Is/Is-not-ErrLocked assertions in lock_stale_test.go, mapping row in execute_test.go (which also keeps st guide output in lockstep).

Test plan

  • go test ./internal/stack -run 'ReclaimGuard|Abandoned'
  • go test ./cmd -run 'TestExitCodeAndErrorCodeMapping|Golden'
  • make ci — green, 87.2% coverage

@andyrewlee
andyrewlee merged commit ee67269 into main Sep 28, 2026
3 checks passed
@andyrewlee
andyrewlee deleted the advisor/024-reclaim-guard-exit-code branch September 29, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant