docs: add error_codes.md aligned with on-main errors.rs#17
Conversation
Mirrors programs/grave-scanner/src/errors.rs (6000-6019) and programs/grave-vault/src/errors.rs (7000-7014) exactly. Per docs/README.md, markdown is the source-of-truth when it disagrees with the .docx snapshots. Previously, error tables had no markdown source so the v3.0 Combined Tech Doc .docx (which lists a 7000-7018 scheme with names like AMMRedemptionFailed) was de facto canon, drifting from on-main. This file establishes the markdown source-of-truth so future drift on this surface is detectable by inspection. Updates docs/README.md to link the new file under a new "Reference" section. No code changes. No CI workflow changes. The Combined Tech Doc full markdown migration is out of scope for this PR. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughA new ChangesError Codes Reference Documentation
🎯 1 (Trivial) | ⏱️ ~3 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Step-level CI timing on fixup #3 reveals the actual failure: Step 7 'Install Anchor CLI' completed in 0s conclusion=success Step 8 'Pin platform-tools v1.54' completed in 48s conclusion=success Step 9 'Anchor build' completed in 1s conclusion=failure `cargo binstall --no-confirm --version 0.32.1 anchor-cli` silently no-ops on anchor-cli 0.32.x — it exits 0 without installing `anchor` on PATH, then `anchor build` exits immediately (1s) because the binary doesn't exist. This is the same silent-no-op pattern I have in failure-pattern memory; I had closed PR #18 thinking cargo-binstall was working (based on PR #17's intermittent success), but it's actually flaky/broken for 0.32.x consistently. Fix: replace cargo binstall with `cargo install --locked --version 0.32.1 anchor-cli` + an `anchor --version` assertion. Source compile takes ~5-7 min on a cold cache but is cached by Swatinem/rust-cache@v2, so steady-state CI time is unchanged. The version assertion fails the install step itself on any future regression instead of deferring to the build step where the symptom is opaque (0s install + 1s build failure is harder to diagnose than a clean install-step failure). Combined with fixup #2 (platform-tools v1.54) and fixup #3 (--no-idl to skip nightly-Rust IDL generation), this should clear anchor build. Locally verified all three together produce a clean `anchor build --no-idl` in 5.67s on m5 and 5.02s on m6. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Step-level CI timing on fixup #3 reveals the actual failure: Step 7 'Install Anchor CLI' completed in 0s conclusion=success Step 8 'Pin platform-tools v1.54' completed in 48s conclusion=success Step 9 'Anchor build' completed in 1s conclusion=failure `cargo binstall --no-confirm --version 0.32.1 anchor-cli` silently no-ops on anchor-cli 0.32.x — it exits 0 without installing `anchor` on PATH, then `anchor build` exits immediately (1s) because the binary doesn't exist. This is the same silent-no-op pattern I have in failure-pattern memory; I had closed PR #18 thinking cargo-binstall was working (based on PR #17's intermittent success), but it's actually flaky/broken for 0.32.x consistently. Fix: replace cargo binstall with `cargo install --locked --version 0.32.1 anchor-cli` + an `anchor --version` assertion. Source compile takes ~5-7 min on a cold cache but is cached by Swatinem/rust-cache@v2, so steady-state CI time is unchanged. The version assertion fails the install step itself on any future regression instead of deferring to the build step where the symptom is opaque (0s install + 1s build failure is harder to diagnose than a clean install-step failure). Combined with fixup #2 (platform-tools v1.54) and fixup #3 (--no-idl to skip nightly-Rust IDL generation), this should clear anchor build. Locally verified all three together produce a clean `anchor build --no-idl` in 5.67s on m5 and 5.02s on m6. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Summary
docs/error_codes.mdas the canonical markdown source-of-truth for both programs' error tables, sourced verbatim fromprograms/grave-scanner/src/errors.rs(6000-6019) andprograms/grave-vault/src/errors.rs(7000-7014).docs/README.mdwith a new Reference section linking the new file..docx§4.2 lists a different scheme (7000-7018 with names likeAMMRedemptionFailed,JupiterSwapFailed,InvalidMerkleProof,InvalidSnapshotData,ComputeBudgetTooLow). On-main is the lock perdocs/README.md's "markdown wins when.docxdisagrees" rule; the.docxscheme is superseded.Why this PR
Spec drift between code and canon docs is treated as a bug per
docs/README.md. The drift on error tables wasn't catchable until now because the Combined Tech Doc has no markdown source-of-truth in the repo — only the frozen.docxsnapshot. This PR introduces a focused, narrow-scope markdown file for the error tables alone so future drift is detectable by inspection.A follow-up PR can add a
scripts/check-error-codes.shCI step that diffserrors.rsdiscriminants againsterror_codes.mdrows. Out of scope here since this is a no-code docs-only PR.Out of scope
docs/grave-scanner-grave-vault-combined.md). Separate, larger PR if/when ordered.published/GraveScanner_GraveVault_CombinedTechnicalDocumentation_v3_0.docx. Perdocs/README.md, that happens at the next minor revision.Heads-up on CI
The
anchor-buildjob has been failing onmainsince PR #15 (toolchain investigation in progress, parallel workstream). This docs-only PR will inherit the red status — merge is gated on the parallel CI fix landing first per the locked security posture (no merging while required checks are red).Test plan
terminology-lint.shlocal pre-check — passes (no forbidden vocabulary in either file)anchor-buildjob green (gated on parallel CI fix landing first)🤖 Generated with Claude Code
Summary by CodeRabbit