Repository navigation
Unify PA rule IDs into one canonical table - #232
hyperpolymath wants to merge 3 commits into
Conversation
Three divergent PA-number schemes lived in this repo: the SARIF/storage table, a private aggregate::category_code table (UnsafeCode->PA001, PanicPath->PA006, 14 of 30 categories), and stale doc comments. A `rule:PA004` coverage spec therefore never matched UnsafeCode findings in aggregate, while SARIF published UnsafeCode as PA004. - WeakPointCategory::rule_id() (const fn) is now the one table; WeakPointCategory::ALL enumerates every variant in ID order. - report::sarif::rule_id delegates to it; aggregate's private table is removed and RuleId coverage uses the canonical IDs. - Tests: exhaustive-match ordinal check that ALL lists every variant once and in order, uniqueness, a golden array pinning all 30 IDs, and an aggregate test that every category is covered by its own ID. - Comment fixes: UnsafeCode is PA004, UnboundedAllocation is PA001b. Behaviour change: aggregate `rule:PA00x` coverage specs written against the old private scheme now resolve to the canonical (SARIF) IDs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PpQVLrCbURpoXtrdvy8V3B
|
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 31 minutes. View limit details
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
Codex Review SummaryThis 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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
✅ Coding Agent task started: View task and status The task will inspect the CI failures, validate its fix, and commit the fix to this branch automatically.
⏭️ Checks skipped: 24 · already failing on `main` (not caused by this PR)
|
|
🤖 Completed: Generate docstrings for PR #232 — View commit |
|
Add Carrot credits or activate Agent usage billing to use Autofix |
Summary
Wave 0 item from the standards ultraplan (
docs/ULTRAPLAN-KAUTZ-LADDER-2026-10-19.adoc): one PA-number table plus a drift test.Before this change the repo had three PA-number schemes that disagreed:
report::sarif::rule_id). This is the published scheme, with UnsafeCode = PA004.aggregate::category_code. It had UnsafeCode → PA001 and PanicPath → PA006, and mapped only 14 of 30 categories.The effect: an aggregate coverage spec
sound:rule:PA004never matched UnsafeCode findings, even though SARIF labels those findings PA004.Changes
WeakPointCategory::rule_id()(aconst fn) is now the only table.WeakPointCategory::ALLlists all 30 variants in ID order.report::sarif::rule_iddelegates to it. The storage hexads already called sarif, so they follow automatically.aggregate::category_codeis deleted.CoverageKind::RuleIdnow matches against the canonical IDs.ALLlists every variant once and in order. Adding a variant without listing it fails to compile or fails the test.rule:<its own id>and agrees with SARIF.tests/aggregate_proof_fixture.rs,tests/fixtures/proofs/UnsafeCodeSoundness.idrandtests/unbounded_corpus.rs.Behaviour change
Aggregate
rule:PA00xcoverage specs written against the old private scheme now resolve to the canonical (SARIF) IDs. Inside this repo, only the tests reference those specs.Validation
cargo test --lib: 413 passed. The integration suites pass too, except as noted below.cargo clippy --all-targets: no new findings in the touched files.cargo fmt --check: the touched hunks are clean. The rest of the repo already has fmt drift onmain(161 hunks), which this PR leaves alone.tests/readiness.rsreadiness_c_diagnostics_outputandreadiness_d_diagnostics_runsfail identically onmain("self-diagnostics reported issues"). Theunused import anyhowwarning insrc/scan/cargodeny.rsand thesafe_path.rsdead-code warnings are also onmain.Out of scope (flag-only follow-ups, other repos)
docs/campaigns/2026-05-26/01-triage.adoc. It is a dated record, so it is left as-is.gitbot-fleet/scripts/fix-*.sh(for examplefix-unbounded-loop.shandfix-unchecked-error.sh) and the Hypatia PA001–PA020 patterns use PA numbers that should be checked against this table.Generated by Claude Code