Repository navigation
fix(rhodibot): refuse unknown (rsr-profile) sub-clauses; read (layout …) - #687
Conversation
J39 (standards A7) says every reader of (rsr-profile …) fails closed on a key the standards module does not define. rhodibot checked :keyword atoms only, so an unknown sub-clause such as (extras …) was skipped silently. * A list that does not follow a :keyword is a sub-clause, and must be one of RSR_PROFILE_CLAUSES = ["notes", "layout"], each at most once (deed_lint.js --rsr-profile-keys order, metadatastician/standards#1630). * (layout (module :gate "<row>" :at ("<path>" …))) is read into ProfileClause.layout. Its shape and keys are checked here (non-empty string :gate, non-empty string-list :at, :gate and :at only and once, each gate once); whether a gate names a real gate-table row, and what a path must be, stays with standards check-rsr-profile.sh. rhodibot's canon command does not score module paths, so its verdicts are unchanged. Tests: clause set pinned to the module's, unknown sub-clause refused, a list value after a key is not a sub-clause, the template's binding is read, eleven malformed layouts refused. cargo test (247), fmt, clippy -D warnings clean; removing the refusal fails the new test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDhtp4kVy7MGgY47YB3
Codex Review Summary: ❌ FailedThis 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. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 418ccfa82c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex on #687 (P1): the sub-clause check exempted any list that followed a :keyword, so (rsr-profile :preset (extras :x "y")) passed. The list satisfied the :capabilities-or-:preset requirement, word(":preset") turned it into None, and the profile resolved to no capabilities, switching every gated check off. * Only a list after a list key (:capabilities, :add, :remove) is a value; any other list is a sub-clause and must be (notes) or (layout). * A list key must take a list; every other key takes one string or symbol, never a list, a following :keyword or nothing. * Each key appears once: field() read only the first, so a second :capabilities was silently ignored. Tests: a_list_after_a_scalar_key_is_refused and a_list_key_takes_a_list_value both failed before this change and pass after. cargo test 249, fmt, clippy -D warnings clean; the template and standards deeds still resolve to 12 and 5 declared capabilities. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDhtp4kVy7MGgY47YB3
…ired forms (#690) ## Why The owner's directive (2026-11-17): rid the estate of A2ML, and make any `.a2ml` a **priority-1** finding in the relevant bots, starting with rhodibot. Today rhodibot reports a legacy `.a2ml` only as `relocated` (→ **info** on the grid), and its GitHub App check still *demanded* `.machine_readable/bot_directives/`, a directory whose files were `.a2ml`. ## What **`canon` (the report-back path)** - New severity **`retired`**, ranked above `missing`. Every tracked `*.a2ml` becomes one `rhodibot.no-a2ml` finding (tier `P1`) **at its own path**, so the grid can place it against a change. - Each finding names the deed form its family maps to (from the standards mapping specs) and whether kyX can convert it today. Only `ECOSYSTEM.a2ml` can (D313). A finding never asks for an `.a2ml` and never suggests hand conversion. - Adds `counts.retired`, a `P1:` summary line, and `--fail-on retired`. - The legacy *read* fallback is unchanged: the criterion an old file would satisfy is still "migrate", never "missing" (CLAUDE.md invariant 1). **GitHub App check (`rsr.rs`)** - **`no-*.a2ml` (RSR-A2ML-001)**: any `.a2ml` in the default-branch tree is a **Required failure under every policy pack**, and `.rsr.toml` cannot skip or downgrade it. - An unlistable or truncated tree becomes a `Skip` that names the reason, never a pass. - **RSR-015 is retired**: demanding `.machine_readable/bot_directives/` was demanding a retired form, since bot directives are now the deed's `(bot-directives …)` clause. The legacy `.bot_directives/` advice now points at that clause. **Report-back:** `retired` → **`critical`**, above `error` (high). ## Dogfood: `rhodibot canon --path .` on this repo **42 P1 findings**, worst first. Only **3** (the ECOSYSTEM files) can be routed to kyX. The other 39 (CLADE, STATE, META, AGENTIC, contractiles, bot directives, session logs, the vendored canon…) have no kyX front end, or no mapping spec at all. `--fail-on retired` exits 1 here and 0 on a clean tree. rhodibot is enrolled here **without `gating`**, so these show on this repo's grid as advisory and don't block. ## Validation (local) - rhodibot: **250 tests pass**, with 8 new ones: every family, ranking, fail-on, all five policy packs, a clean tree, an unlistable tree, and RSR-015 retired. clippy `-D warnings` is clean, rustfmt is clean, and `check-canon-drift.sh` is OK. - `tests/fleet-report-back-test.sh`: **214 passed**, including new checks that `retired` → `critical` and that the finding is placed at its path. The build test: 69 passed. ## Coordination `bots/rhodibot/src/deed.rs` is untouched. #687 owns it, so the two merge independently. ## Rollout note Repos that call `fleet-report-back-reusable.yml` at an older fleet SHA keep the old behaviour. The P1 rule reaches them only when their pin moves; the rollout options are in the companion fixer PR. --- _Generated by [Claude Code](https://claude.ai/code/session_01J4QvDhFeexmokLqLRfZNce)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
…t …) (#1630) Owner ruling 2026-11-16 (hyperpolymath/rsr-template-repo#421): `check-rsr-profile.sh` reads the paths it requires from the repo deed's `(rsr-profile)` clause instead of hard-coding them, so a repo's layout and its check cannot drift apart. ## Design (owner-selected: the `(layout)` binding) `clauses/rsr-profile.abnf` v1.1.0 adds: ``` (layout (module :gate "abi.ipkg" :at ("src/interface/abi.ipkg"))) ``` The gate table still says **what** a capability owes and its default location. A binding says **where** this tree keeps it. `:gate` names a `[gates]` row by one of its alternatives, written exactly as the table writes it. `check-rsr-profile.sh` applies these rules on both the awk and the AST parser paths: | Case | Verdict | |---|---| | capability declared, bound path present | `bound by (layout): <row> -> <path>` | | capability declared, a bound path absent | **MISSING** (exit 1). The row's defaults are not consulted, because the deed is authoritative. | | capability undeclared, bound path present | **VESTIGIAL** (`[carrier]` still exempts a spine) | | capability undeclared, bound path absent | **STALE** (exit 1): the binding names nothing | | bound path of a different kind (another file name, or a file for a directory row) | refused (exit 2) | | `:gate` names no `[gates]` row, a `[baseline]` row, or one row twice | refused (exit 2) | | `:at` absolute, with `.`/`..`/empty segments, a pattern, or an escape | refused (exit 2) | Shape obligations follow the artefact, not its row. A bound Containerfile must be non-empty, and a bound formal-proofs directory must hold prover sources. No carrier exemption excuses a missing bound path. The check never weakens: a binding only replaces the default locations of a row the repo declares, and it is held to the same kind of artefact. `deed_lint.js --rsr-profile` owns the new keys (J39). `--rsr-profile-keys` now prints `(layout)`, and `(module …)` takes `:gate` and `:at` only. **Not a canon release.** The gate table and every `canon.lock` artefact are byte-unchanged. ## Evidence (run locally) - `bash scripts/tests/check-rsr-profile-test.sh`: awk 80/80, AST 82/82 (was 51/53), plus current-layout controls 29/29. That is 29 new controls under each parser. The commit message says "34"; that count is wrong, and 29 is correct. - Mutation check of the new controls. Each mutation turns some controls red: `present_at` always true (7 red), no name/kind check (2), STALE ignored (1), bound rows falling through to defaults (4), unknown gate accepted (2). - `bun test deed_lint.test.js`: 335/335. `--rsr-profile-fixtures`: OK, with 21 new fixtures (2 valid, 19 invalid). - `tools/deed-abnf-differential`: `deed_lint.js and deed.abnf agree`. The new invalid fixtures are classified grammar-rejected or semantic-only. - Self-conformance (`check-rsr-profile.sh .`) still passes under both parsers. - shellcheck 0.10.0 `-S warning`: clean. - Against hyperpolymath/rsr-template-repo branch `claude/determined-fermi-h8ojbr`: **OK** (AST path). Against a fixture whose bound path is missing: **MISSING**, exit 1. ## Downstream (not in this PR) - **gitbot-fleet / rhodibot**: hyperpolymath/gitbot-fleet#687. - *Correction:* an earlier version of this description said rhodibot's key-set test would go red once this merges. It will not. Nothing compares rhodibot's list against `--rsr-profile-keys` at run time; its test pins a hard-coded list of `:keys` only. - The real gap was that rhodibot skipped every sub-clause silently, against J39. #687 refuses unknown sub-clauses and reads `(layout)`. It is safe to merge in any order. - **hypatia** reads only `capabilities`, so it is unaffected as far as I can see. Not verified by running it. - **A2ML spellings** still in the gate table's `[baseline]`: tracked for a canon PATCH in #1631. - **Merge order:** this PR first, then hyperpolymath/rsr-template-repo#427. An older checker refuses `(layout)` as an unknown key. --- _Generated by [Claude Code](https://claude.ai/code/session_01J4QvDhtp4kVy7MGgY47YB3)_ Co-authored-by: Claude <noreply@anthropic.com>
…into claude/determined-fermi-h8ojbr
|



Follow-up to metadatastician/standards#1630 (owner ruling 2026-11-16, made while working on hyperpolymath/rsr-template-repo#421). That PR adds
(layout (module :gate "<row>" :at ("<path>" …)))to(rsr-profile …).What was wrong
J39 (standards A7) says every reader of
(rsr-profile …)fails closed on a key the standards module does not define.Deed::rsr_profilechecked only:keywordatoms. Any sub-clause, known or not ((extras …), now(layout …)), was skipped silently. A list after a scalar key, and a repeated key, also slipped through (Codex P1, fixed in e44f179).Change (
bots/rhodibot/src/deed.rs)Only a list after a list key (
:capabilities,:add,:remove) is that key's value. Any other list is a sub-clause, and it must be one ofRSR_PROFILE_CLAUSES = ["notes", "layout"], each at most once. That is the orderdeed_lint.js --rsr-profile-keysprints them in.Each key appears once, and its value is checked as the walk reaches it. A list key takes a list. Every other key takes one string or symbol, never a list, a following
:keyword, or nothing.(layout …)is read intoProfileClause.layout. This reader checks::gateis a non-empty string, and each gate appears once;:atis a non-empty list of strings;:gateand:atonly, each once.Whether a gate names a real gate-table row, and what each path must be, stays with standards
check-rsr-profile.shanddeed_lint.js --rsr-profile.rhodibot canondoes not score module paths, so its verdicts are unchanged.Evidence
cargo test: 249 passed (lib 179).cargo fmt --checkandcargo clippy --all-targets -- -D warningsare clean.truefailsan_unknown_sub_clause_is_refused_not_skipped.a_list_after_a_scalar_key_is_refusedanda_list_key_takes_a_list_valuefail before e44f179 and pass after it.rhodibot canon --pathon rsr-template-repo branchclaude/determined-fermi-h8ojbr, whose deed carries(layout): reads the profile, 12 declared capabilities. On standards: unchanged, 5 declared.Merge order
Any order is safe. This accepts
(layout)with or without standards#1630, and it refuses only sub-clauses that the old and new standards modules both refuse.Follow-up: moved
.a2mlpaths (11 high-severity findings on ci(hypatia): pin the scanner to hypatia main 6d8ab66 echo-types#378). Moved. The owner made.a2mlretirement a priority-1, bot-driven task through kyX (D313). That task now belongs to the session "gitbot-fleet: fix red main + P1 auto-retire .a2ml via kyX", including reversing rhodibot's.a2mlexpectation. This PR stays limited to deed-clause reading. Leads handed over:bots/rhodibot/canon/rsr-criteria-v2.a2mlstill names.a2mlpaths;src/canon/overlay.rshas no deed form for CLADE (3.1.9);src/canon/local.rskeeps the legacyrsr-profile.a2mlread fallback.Generated by Claude Code
Summary by CodeRabbit