Repository navigation
Conversation
- sysexits-aligned exit codes: 64 usage, 65 corrupt state, 69 unavailable,
70 internal, 73 write did not persist (66 reserved)
- single CLIOutput.fail path: human stderr line + optional
{error:{code,message,hint}} envelope (--json/--jsonl or APS_ERROR_JSON=1)
- StateStore.ensureReadable: corrupt note.json/profile.json exits 65
instead of silently returning the initial value
- disk readers split missing (persistenceFailed) from corrupt (decodingFailed)
- tests + smoke assertions for the whole contract; specs/README in lockstep
- SpecSync CHG-0016 accepted; evidence rebound for CHG-0003/0004/0007/0011/
0012/0013/0014/0015 (audited reopens, actor 0xLeif)
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Jul 18, 2026
Owner
Author
0xLeif
added a commit
that referenced
this pull request
Jul 19, 2026
- sysexits-aligned exit codes for every APSError: 64 usage, 65 data
(corruptState + decodingFailed), 69 unavailable, 70 internal,
73 write did not persist (66 reserved)
- single CLIOutput.fail path: human stderr line + optional
{error:{code,message,hint}} envelope (--json/--jsonl or APS_ERROR_JSON=1);
replaces the corruptState-only reportAPSError shim and ValidationError
flattening; dump/reset covered for the first time
- keeps CHG-0016's requireDecodableDiskState as the loud corrupt-state
mechanism (no duplicate)
- tests + smoke assertions for the whole contract; specs/README in lockstep
- SpecSync CHG-0018 accepted; evidence rebound for CHG-0003/0004/0007/0011/
0012/0013/0014/0015/0016/0017 (audited reopens, actor 0xLeif)
Supersedes #47 (rebuilt on post-#43 main).
0xLeif
added a commit
that referenced
this pull request
Jul 19, 2026
- sysexits-aligned exit codes for every APSError: 64 usage, 65 data
(corruptState + decodingFailed), 69 unavailable, 70 internal,
73 write did not persist (66 reserved)
- single CLIOutput.fail path: human stderr line + optional
{error:{code,message,hint}} envelope (--json/--jsonl or APS_ERROR_JSON=1);
replaces the corruptState-only reportAPSError shim and ValidationError
flattening; dump/reset covered for the first time
- keeps CHG-0016's requireDecodableDiskState as the loud corrupt-state
mechanism (no duplicate)
- tests + smoke assertions for the whole contract; specs/README in lockstep
- SpecSync CHG-0018 accepted; evidence rebound for CHG-0003/0004/0007/0011/
0012/0013/0014/0015/0016/0017 (audited reopens, actor 0xLeif)
Supersedes #47 (rebuilt on post-#43 main).
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 #31.
Summary
Implements the error contract from design decision 4:
invalidValue), 65 corrupt persisted state (decodingFailed), 69 unavailable (keychainUnavailable), 70 internal (encodingFailed), 73 write did not persist (persistenceFailed); 66 reserved. AllAPSErrorvalues flow through oneCLIOutput.failpath instead of being flattened intoValidationError(which made everything 64).--json/--jsonl, orAPS_ERROR_JSON=1, stderr additionally gets{"error":{"code","message","hint"}}with stable snake_case codes. stdout stays empty on error in every mode.StateStore.ensureReadabledistinguishes missing files (initial-value semantics, unchanged) from existing-but-undecodablenote.json/profile.json(exit 65) beforeget/watchoutput. Disk readers now split missing (persistenceFailed) from corrupt (decodingFailed);setverification maps read-back failures topersistenceFailedas before.Verification (all local, worktree)
swift buildclean; 42 tests (6 new: taxonomy mapping, envelope shape, envelope modes, ensureReadable missing/corrupt/corrupt-profile), 0 failuressmoke.shextended and green: exit 64/65/73 assertions, stdout purity, envelope greps,APS_ERROR_JSON=1specsync check --force(100% LOC) andspecsync change check(15 active valid) green;fledge lanes run verifygreenSpecSync
Notes
.withoutEscapingSlashesso paths in hints stay readable.