Skip to content

feat(assail): route languages through a tested table; retire the vacuous PA1 - #282

Open
hyperpolymath wants to merge 3 commits into
claude/abi-idris2-gatefrom
claude/pa1-routing-table
Open

hyperpolymath wants to merge 3 commits into
claude/abi-idris2-gatefrom
claude/pa1-routing-table

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Stacked on #279 (Idris2 gate), which is stacked on #277 (proof-status reconcile). Review and merge in that order.

What

The Idris2 PatternCompleteness.idr (PA1) is replaced by the code that actually does the routing, plus exhaustive tests.

  • New src/assail/routing.rs:
    • route(Language) -> Route is an exhaustive match with no wildcard.
    • Route::analyzer() names the analyzer each route reaches.
    • runs_cross_language(is_configuration) returns !is_configuration.
  • analyzer.rs: the dispatch in analyze_inner now matches on route(file_lang). So the table is the code that runs, not a model of it. Only the match arm heads changed, and so did the cross-language guard.
  • src/types.rs: adds Language::ALL (52 variants). An exhaustive ordinal test keeps it complete.

Claims and how they are tested (status TESTED)

Each test was seen to fail on a planted fault.

Claim Test Planted fault it caught
(a) Every language analyzer is reached every_language_analyzer_is_reached an unrouted analyze_chapel
(b) No language falls back to the generic analyzer while a dedicated one exists no_language_falls_back_while_a_dedicated_analyzer_exists Java sent to Generic
(c) Cross-language checks run exactly on non-configuration content cross_language_checks_run_exactly_off_configuration (a Justfile plus main.lua, end to end) runs_cross_language forced to true
(d) The README's language counts match the table readme_language_counts_match_the_table the README's stale 49

Routing is not coverage. Language::Unknown goes to InputAdapter, and a file there with no adapter is marked unsupported and skipped. PROOF-NEEDS.adoc says so.

Retired

  • PatternCompleteness.idr, for three reasons:
    • It was vacuous: GenericAnalyzer inhabited its witness for every language.
    • It was stale: it covered 50 of 52 languages.
    • It was partly false: it said cross-language checks always run.
  • The ipkg now lists 4 modules.
  • The pa1 entry in 0-AI-MANIFEST.a2ml is deleted. This is a deletion only.
  • The README count: 49 → 51 supported languages, in the badge, the capabilities list and the summary.

Found, not fixed here (recorded in PROOF-NEEDS open obligations)

  • Unquoted http:// URLs are missed by the cross-language check. analyze_cross_language strips // comments from every file. That also cuts curl http://host in shell and Justfile recipes. The fix is a follow-up stacked PR.
  • Prove PA1 (a)–(c) with Creusot/Pearlite and Verus.

Verification


Generated by Claude Code

…ous PA1

PA1 was an Idris2 model of the analyzer dispatch whose theorem could not
fail: `GenericAnalyzer : HasAnalyzer lang` inhabited its witness for every
language. It was also stale (50 of 52 languages) and partly false (it said
cross-language checks always run; they are skipped for configuration).

The routing is now real code with claims that can fail:

- src/assail/routing.rs: `route(Language) -> Route`,
  `Route::analyzer()`, and `runs_cross_language(is_configuration)`.
  `analyze_inner` matches on `route(file_lang)` and calls
  `runs_cross_language`. Only the arm heads changed; every arm body is
  byte-identical. `route` and the dispatch are exhaustive with no
  wildcard (Chapel, the one language without a dedicated analyzer, is
  routed to Generic explicitly).
- src/types.rs: `Language::ALL` (52 variants), kept complete by an
  exhaustive `ordinal` match test, following WeakPointCategory::ALL.
- Tests, exhaustive over Language::ALL:
  (a) every language analyzer in analyzer.rs is reached;
  (b) no language falls back to analyze_generic while a dedicated
      analyzer for it exists;
  (c) cross-language checks run exactly off configuration, and on
      scripts embedded in it (Justfile + Lua scan, end to end);
  (d) README's language counts equal the supported count.
  Each was seen to fail on a planted fault.
- README: 49 -> 51 languages (badge, capabilities, summary); (d) caught
  the drift. C and Php were added after the count was written.
- PatternCompleteness.idr removed from src/abi and the ipkg; PROOF-NEEDS,
  EXPLAINME, PROOF-PROGRAMME and the 0-AI-MANIFEST entry updated. PA1's
  status is TESTED; the Creusot/Pearlite and Verus proof is OPEN.

Found while testing (c), recorded as an open obligation, not fixed here:
the cross-language check strips `//` comments before matching, which
also cuts unquoted `http://` URLs (shell, Justfile recipes).

Checked: cargo fmt; clippy -D warnings with all and default features;
cargo test --all-features (789 passed, 0 failed); the Idris2 package
type-checks (4 modules); panic-attack's self-scan reports nothing new.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jma5ixtpeZyJRmfoSsC98u
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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 16 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: bd6812de-05ec-45a6-a9cf-3f1a24aeac0c
Commits

Reviewing files that changed from the base of the PR and between 8820e6e and 5592b25.

Files selected for processing: 11

  • 0-AI-MANIFEST.a2ml
  • EXPLAINME.adoc
  • PROOF-NEEDS.adoc
  • PROOF-PROGRAMME.adoc
  • README.adoc
  • src/abi/PanicAttack/ABI/PatternCompleteness.idr
  • src/abi/panic-attack-abi.ipkg
  • src/assail/analyzer.rs
  • src/assail/mod.rs
  • src/assail/routing.rs
  • src/types.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2026

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath added this pull request to stack #283 November 9, 2026 15:49
@hyperpolymath
hyperpolymath marked this pull request as ready for review November 9, 2026 15:49
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-09T15:49:30.005832Z
We couldn’t complete this review. Comment @codex review to try again.
5592b25 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants