Repository navigation
fix(deed): cap nesting, keep metadata errors, keep the error chain; UUID gate green - #296
Conversation
…rror chain Follow-up to #295, addressing three open review findings and the UUID gate failure on its head. 1. src/deed.rs: clause recursion (members) and list recursion (value/list, quoted lists included) were unbounded, so a deed of a few MB with ~10,000 nested '(' overflowed the stack and aborted the process. One shared limit, MAX_NESTING = 64, is now checked before every descent and returns a line-numbered DeedError. deed.abnf sets no limit; this is a resource bound of the reader. 2. src/assail/classifications.rs: Path::exists() turned any metadata error (e.g. an unreadable audits/) into "no deed", so the reader silently fell back to the legacy registry. symlink_metadata now decides: NotFound (or NotADirectory, when audits is a regular file) means absent; any other error propagates with the registry path. 3. src/assemblyline.rs: scan_repo stored e.to_string(), which keeps only the outermost anyhow context and drops the deed's line and reason. It now stores format!("{e:#}"). UUID gate: two negative fixtures in deed.rs's tests were bare v4/v5 UUID literals (escaped quotes hide them from the #uuid"..." rule), which check-uuid-v8.sh --strict rejects. They are now derived at run time from the v8 fixture id. Tests: nesting at and past the limit for clauses, lists and the two combined; 100,000-deep clauses and lists return Err; the error line; unreadable audits/ (skipped when privileged), audits as a file, a dangling deed symlink; and the deed line and reason reaching the assemblyline error string. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7ZoBy5xGnGDLk7wQ8jC
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 21 minutes. View limit details
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. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
## Summary `panic-attack_chora.deed` writes `:repo-uuid #u5"hyperpolymath/panic-attack"` and `:beholding-chora #u5"estate/chora"`. Owner ruling Q2 (CHORA-SPEC 7.1) refuses `#u5` in identity fields, and so do both `deed_lint` and the current standards `check-uuid-v8.sh --strict`. The UUID gate here runs the older a797d30 checker, so it passes today. It will fail once its standards pin moves. ## Changes The fix copies the registered ids; nothing is minted or reminted. - `:repo-uuid #uuid"a39ad6b1-51e0-854d-aa9a-d9ee97ba519b"`. - This is the v8 id that chora-registry records for `panic-attacker`, this repo's birth name. The deed's own `(lineage :previous-names)` already lists that name. - It was minted in `gv-clade-index` before V9, and the rename never reminted it (U1). - Sources: `verisim/seed/chora-registry_praxis.deed` line 1014, `worker/data/repos.json`. - `:beholding-chora #uuid"0889b37b-defb-831f-973c-e119500db00e"`, the estate chora named in CHORA-SPEC and in the standards manifest. hypatia_chora.deed uses the same id. - The `no-self-suppression` obligation note now names `audits/assail-classifications_praxis.deed`, the registry that #295 made primary. ## Verification - `deed_lint` (standards main) on `panic-attack_chora.deed`: OK. It failed before this change. - `check-uuid-v8.sh --strict` (standards main): the two deed lines no longer appear. The only remaining lines are the `src/deed.rs` fixtures that #296 fixes. --- _Generated by [Claude Code](https://claude.ai/code/session_0136P7ZoBy5xGnGDLk7wQ8jC)_ Co-authored-by: Claude <noreply@anthropic.com>



Summary
This fixes the four findings left open when #295 merged. Three were bot findings; the fourth is the UUID-gate failure that #295 introduced.
Changes
src/deed.rs: nesting was unbounded. (Codex P1, CodeRabbit Major.) Clause nesting (members) and list nesting (value/list, quoted lists included) had no limit, so a deed of a few MB could overflow the stack and abort the process.MAX_NESTING = 64, documented.deed.abnfsets no limit, so this is a limit of this reader only.Parser::deeperchecks it before every descent. Past the limit it returns a line-numberedDeedError.src/assail/classifications.rs: metadata errors were swallowed. (Codex P2, CodeRabbit Minor.)Path::exists()is replaced byfs::symlink_metadata.NotFound, orNotADirectorywhenauditsis a regular file, counts as absent and allows the.a2mlfallback.src/assemblyline.rs: the error chain was lost. (CodeRabbit Minor.)scan_repostoresformat!("{e:#}"), so the deed's file, line and reason reachRepoResult.error.governance / UUID v7/v8 conformancefailures on feat(assail): read the user-classification registry as a deed first #295 came from the bare v4 and v5 negative fixtures insrc/deed.rs. Those ids are now built at run time from the v8 fixture id.check-uuid-v8.sh --strictat a797d30 (CI's pin): 29ecc73 passes, cbf2b93 fails with CI's two lines, and this head passes.Verification
cargo fmt --check: clean.cargo clippy --all-targetsandcargo build --release: 0 warnings.cargo test: 793 passed, 0 failed, 4 ignored. Nine tests are new:Errwithout overflowing; clauses and lists share one limit;audits/is an error,auditsas a regular file counts as absent, and a dangling symlink is an error;exists()code.Generated by Claude Code