feat(tooling): inline fence annotations replace line-numbered allowlists; fix_allowlists.py retired#863
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 3 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR replaces line-number-keyed allowlists with inline ChangesInline annotation migration
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 8✅ Passed checks (8 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #863 +/- ##
=======================================
Coverage 92.00% 92.00%
=======================================
Files 95 95
Lines 28809 28809
Branches 332 332
=======================================
Hits 26506 26506
Misses 2295 2295
Partials 8 8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Adversarial review complete (M-tier, two independent skeptics): CLEAN, zero findings. Skeptic 1 (gate teeth + coverage conservation): the 176 = 165 + 11(+1 re-annotated) accounting proven at content level, not counts; all eight mutation classes fail loudly (stale, removed, malformed incl. the Skeptic 2 (blast radius): each of the 12 formerly-suppressed blocks individually re-run through the real gate runners — the 11 removals genuinely pass their stages now (including the complete, correct |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
spec/07-effects.md (2)
205-217: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winAlign this example with
parse_int.
parse_intis documented inspec/09-standard-library.mdas a pureResult<Int, String>function, not anExn<String>thrower. As written, the example teaches the wrong effect model.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@spec/07-effects.md` around lines 205 - 217, The example in safe_parse is using the wrong effect model for parse_int, which is documented as returning Result<Int, String> rather than throwing Exn<String>. Update the snippet to match the standard library behavior by replacing the handler/throw-based flow with the actual Result-based parsing pattern, and keep the example centered on safe_parse and parse_int so the effects documentation teaches the correct API semantics.
254-286: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winUse the supported higher-order call form in both snippets.
Both examples still invoke a function-valued slot directly (
@Fn.0(...)). That makes the parse skip cover the wrong failure mode and conflicts with the higher-order call rule.Suggested fixes
- Some(`@A`) -> Some(`@Fn.0`(`@A.0`)), + Some(`@A`) -> Some(apply_fn(`@Fn.0`, `@A.0`)),- let `@A` = `@Fn.0`(()); + let `@A` = apply_fn(`@Fn.0`, ());🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@spec/07-effects.md` around lines 254 - 286, Both examples are using the wrong higher-order invocation form by calling the function-valued field directly with `@Fn.0`(...), which does not match the supported syntax. Update option_map and with_logging to use the proper higher-order call form for the function parameter named Fn, so the snippets demonstrate the intended call rule rather than a parse-skipped direct field call. Keep the effect-variable behavior unchanged while adjusting only the function invocation syntax in these two examples.spec/05-functions.md (1)
327-339: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winUse
apply_fnfor the higher-order call.
@Fn.0(@A.0)directly applies a function-valued slot, which conflicts with the stored-function invocation rule documented earlier. If direct calls on function values are now legal, the docs need to say so; otherwise this example should useapply_fn(...).Suggested fix
- Some(`@A`) -> Some(`@Fn.0`(`@A.0`)), + Some(`@A`) -> Some(apply_fn(`@Fn.0`, `@A.0`)),🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@spec/05-functions.md` around lines 327 - 339, The option_map example is using a direct function-value call via `@Fn.0`(`@A.0`), which conflicts with the documented invocation style for stored functions. Update the example in option_map to use apply_fn for the higher-order call, and keep the surrounding fn/Some/None pattern unchanged so the snippet matches the invocation rule described earlier.spec/09-standard-library.md (1)
1749-1767: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winMove or delete this stray annotation.
The
reasonmentionsstring_chars/lines/words, but the fence it precedes isarray_sort_by, and the matching string-utility fence already appears later in the file. That mislabels the suppression target.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@spec/09-standard-library.md` around lines 1749 - 1767, The stray vera:skip-parse annotation is attached to the wrong fenced snippet, so move or remove it from the array_sort_by example and place it with the string utility fragment it actually refers to. Update the surrounding comment/annotation near array_sort_by in the standard library docs so the suppression target matches the later string_chars/lines/words section and the parser skip remains correctly scoped.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/check_examples_doc.py`:
- Around line 8-27: The parse-only gate logic in main() is duplicated across
check_examples_doc.py, check_faq_examples.py, and check_readme_examples.py.
Extract the shared scan/classify/count/exit flow into a reusable helper in
doc_annotations.py, such as run_parse_only_gate, and have each script call it
with only its target path and label differences. Keep the existing
evaluate_block, scan_markdown, and unsupported_stage_annotations behavior
unchanged while removing the triplicated reporting logic from the individual
scripts.
In `@scripts/doc_annotations.py`:
- Around line 149-162: Handle unterminated blocks as validation failures in the
Markdown and HTML parsing flow: in the code that builds CodeBlock entries and
the `<pre>` handling logic, detect when the closing fence/tag is missing before
EOF and surface it as a gate problem instead of appending or silently ignoring
the block. Update the parsing paths around the CodeBlock construction and the
`<pre>` branch to report an explicit error even when pending annotations are
present, so malformed docs cannot pass unnoticed.
---
Outside diff comments:
In `@spec/05-functions.md`:
- Around line 327-339: The option_map example is using a direct function-value
call via `@Fn.0`(`@A.0`), which conflicts with the documented invocation style for
stored functions. Update the example in option_map to use apply_fn for the
higher-order call, and keep the surrounding fn/Some/None pattern unchanged so
the snippet matches the invocation rule described earlier.
In `@spec/07-effects.md`:
- Around line 205-217: The example in safe_parse is using the wrong effect model
for parse_int, which is documented as returning Result<Int, String> rather than
throwing Exn<String>. Update the snippet to match the standard library behavior
by replacing the handler/throw-based flow with the actual Result-based parsing
pattern, and keep the example centered on safe_parse and parse_int so the
effects documentation teaches the correct API semantics.
- Around line 254-286: Both examples are using the wrong higher-order invocation
form by calling the function-valued field directly with `@Fn.0`(...), which does
not match the supported syntax. Update option_map and with_logging to use the
proper higher-order call form for the function parameter named Fn, so the
snippets demonstrate the intended call rule rather than a parse-skipped direct
field call. Keep the effect-variable behavior unchanged while adjusting only the
function invocation syntax in these two examples.
In `@spec/09-standard-library.md`:
- Around line 1749-1767: The stray vera:skip-parse annotation is attached to the
wrong fenced snippet, so move or remove it from the array_sort_by example and
place it with the string utility fragment it actually refers to. Update the
surrounding comment/annotation near array_sort_by in the standard library docs
so the suppression target matches the later string_chars/lines/words section and
the parser skip remains correctly scoped.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 83f0ea5d-1444-4dd4-a11d-c768b1f54ae0
📒 Files selected for processing (30)
.pre-commit-config.yamlCHANGELOG.mdCLAUDE.mdCONTRIBUTING.mdFAQ.mdKNOWN_ISSUES.mdROADMAP.mdSKILL.mdTESTING.mdscripts/build_site.pyscripts/check_examples_doc.pyscripts/check_faq_examples.pyscripts/check_html_examples.pyscripts/check_readme_examples.pyscripts/check_skill_examples.pyscripts/check_spec_examples.pyscripts/doc_annotations.pyscripts/fix_allowlists.pyspec/01-lexical-structure.mdspec/02-types.mdspec/03-slot-references.mdspec/04-expressions.mdspec/05-functions.mdspec/06-contracts.mdspec/07-effects.mdspec/09-standard-library.mdtests/test_build_site.pytests/test_doc_annotations.pytests/test_html.pytests/test_readme.py
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
aallan/vera-bench(manual)
💤 Files with no reviewable changes (3)
- scripts/fix_allowlists.py
- CLAUDE.md
- KNOWN_ISSUES.md
|
@coderabbitai All six round-1 findings addressed in 234ba09 — the two inline threads have direct replies; the four outside-diff findings (no threads) are resolved as follows: spec/07-effects.md §7.5 (safe_parse taught spec/07-effects.md §7.6/§7.6.1 and spec/05-functions.md §5.9.1 (direct spec/09-standard-library.md (mis-anchored suppression reason) — the annotation on the Also in 234ba09: the unterminated-fence/ |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
git log --oneline -5
git show --stat 234ba09 2>/dev/null | head -50
echo "---parse_int check---"
git show 234ba09 -- spec/07-effects.md 2>/dev/null | head -150
echo "---stdlib annotation---"
git show 234ba09 -- spec/09-standard-library.md 2>/dev/null | head -80
echo "---changelog---"
git show 234ba09 -- CHANGELOG.md 2>/dev/nullLength of output: 2360
Based on your description, the fixes look sound from a correctness standpoint:
If you'd like, I can re-run a fresh full review pass once I have working repo access, to independently confirm the stale-annotation counts and byte-identical site assets rather than taking the summary at face value. ✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
…ed allowlists (#538, retires #606) Squash of the migration + the CodeRabbit round (scanner hardening, run_parse_only_gate extraction, spec example corrections). Co-Authored-By: Claude <[email protected]>
234ba09 to
ff94875
Compare
…notation gates Skip-changelog: guard-style polish flagged by the ruff -S sweep; no behavior change. Co-Authored-By: Claude <[email protected]>
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/test_build_site.py`:
- Around line 293-296: The test
`test_llms_full_txt_strips_vera_skip_annotations` can pass vacuously because it
only checks the compiled `build_llms_full_txt("0.0.0")` output and never
verifies the source content actually contains `vera:skip-` first. Add the same
kind of precondition guard used by the sibling test above by asserting the
relevant inlined source (`SKILL.md`/`FAQ.md`) includes a `vera:skip-` annotation
before checking the built output, so the test fails if `build_llms_full_txt`
stops inlining or stripping annotations.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 57167bac-8d36-4c83-8039-b59fd635ad60
📒 Files selected for processing (30)
.pre-commit-config.yamlCHANGELOG.mdCLAUDE.mdCONTRIBUTING.mdFAQ.mdKNOWN_ISSUES.mdROADMAP.mdSKILL.mdTESTING.mdscripts/build_site.pyscripts/check_examples_doc.pyscripts/check_faq_examples.pyscripts/check_html_examples.pyscripts/check_readme_examples.pyscripts/check_skill_examples.pyscripts/check_spec_examples.pyscripts/doc_annotations.pyscripts/fix_allowlists.pyspec/01-lexical-structure.mdspec/02-types.mdspec/03-slot-references.mdspec/04-expressions.mdspec/05-functions.mdspec/06-contracts.mdspec/07-effects.mdspec/09-standard-library.mdtests/test_build_site.pytests/test_doc_annotations.pytests/test_html.pytests/test_readme.py
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
aallan/vera-bench(manual)
💤 Files with no reviewable changes (2)
- CLAUDE.md
- scripts/fix_allowlists.py
… sibling Skip-changelog: test-precondition polish from CodeRabbit round 2. Co-Authored-By: Claude <[email protected]>
|
@coderabbitai review |
✅ Action performedReview finished.
|
…tion Skip-changelog: count bookkeeping for the prior review commit. Co-Authored-By: Claude <[email protected]>
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
Burndown PR implementing #538, which structurally retires bug #606 (the maintainer-chosen resolution): documentation code-block exemptions now live as
<!-- vera:skip-parse category="..." reason="..." -->HTML comments on the line before the fence (the syntax #538's body specifies — invisible in rendered markdown, per-stageskip-parse/skip-check/skip-verifydirectives stack), instead of line-number-keyed dicts that every edit above them invalidated.scripts/fix_allowlists.pyand its pre-commit hook are deleted — the #606 bulk-shift bug class can no longer exist.scripts/doc_annotations.py(scan/evaluate/strip).fn addblock suppressed by exactly the scripts/fix_allowlists.py: bulk-shift heuristic misses entries on multi-edit sequences #606 mis-anchoring class, and 10 spec blocks whose features have long since landed. 11 removed outright, 1 re-annotated honestly.build_site.pygainsstrip_annotations()so regenerated site assets are byte-identical to pre-migration (leak-tested, non-vacuous).check_e602_clean's contract.Closes #538
Closes #606
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
<!-- vera:skip-parse/check/verify ... -->directives that intentionally control parser and checker behaviour across Markdown and HTML.Bug Fixes
Chores