Skip to content

[TRACK_F] FIX: Stop the fast-mode metrics fallback from carrying non-Coq claims - #90

Merged
ib823 merged 1 commit into
mainfrom
ccr-db4b5499-udxc4o
Oct 12, 2026
Merged

ib823 merged 1 commit into
mainfrom
ccr-db4b5499-udxc4o

Conversation

@ib823

@ib823 ib823 commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Summary

When reports/noncoq_mechanized_status.json was stale, scripts/generate-metrics.sh --fast fell back to the previous metrics.json. The pre-commit hook and deploy-website.sh both use this path. The fallback rebuilt each lane's *_COMPILED and *_MECHANIZED_READY from two sources: the previously published claimLevels, and smoke passes.

So a smoke pass became a published "compiled" claim. Every later fast run then read that claim back as evidence, so the overclaim kept itself alive. This is what put Alloy at "compiled" during the PR #89 deploy, until the public claim-integrity gate refused the sync.

Changes

  • The fallback no longer carries claims. It keeps only descriptive fields:

    • pending reasons ("none" becomes the stale-report reason);
    • backlogs;
    • smoke results this run did not observe.

    Without a fresh report, every non-Coq lane is generated. That is the rule public-quality-gates.sh already enforces.

  • A smoke result observed in this run beats a cached one. Each smoke check now records whether it actually ran, so a cached pass can no longer hide a smoke check that now fails.

  • One freshness rule. report_head_matches_or_compatible in the generator now matches the public gate:

    • lane paths must be content-identical between the report's commit and HEAD;
    • .md files are ignored;
    • no ancestry is required;
    • a missing commit or a failing git diff counts as stale.

    Before, the generator could call a report stale that the gate accepted as fresh.

  • Isabelle: a smoke pass no longer sets isabelleCompiled. This extends the HONESTY POLICY that already covered F*, TLA+ and Alloy. The flaw was hidden only because the Isabelle lane is retired.

  • New test: scripts/test-generate-metrics-fallback.sh runs the generator in a throwaway clone (about 3 minutes) and covers three scenarios:

    1. A stale report plus inflated cached metrics: no claim survives, including across a second run.
    2. A smoke check observed failing beats a cached pass.
    3. The freshness rule agrees with the gate: a markdown-only lane change keeps the report fresh, and a code change makes it stale.
  • RIINA_MASTER_PLAN.md Part 11 records the fix and closes the open item noted in the PR Audit remediation: proof integrity, new core theorems, compiler/runtime soundness, supply chain #89 deploy entry.

Type

  • Bug fix
  • New feature
  • Documentation
  • Example .rii file
  • Formal proof
  • Refactor

Testing

  • cargo test --all passes: 3,528 tests in the pre-commit hook. No Rust code changed.
  • cargo clippy -- -D warnings passes
  • Coq build passes (make in 02_FORMAL/coq/) — not applicable, no proofs changed
  • New tests added for new functionality: scripts/test-generate-metrics-fallback.sh fails 32 assertions against the generator on main (the original bug, reproduced) and passes against this branch.
  • generate-metrics.sh --fast on this tree: published claims are unchanged (the current report is fresh). Only the timestamp, commit and branch fields moved.
  • public-quality-gates.sh (claim integrity PASS), audit-docs.sh (all current) and update-proof-ledger.sh --check (up to date).
  • Pre-push hook, including the strict security gates.

Checklist

  • No external dependencies added
  • No unsafe without justification
  • No Admitted in Coq proofs
  • Examples use Bahasa Melayu keywords — not applicable

🤖 Generated with Claude Code

https://claude.ai/code/session_01E6roGMqnThhqeobMHTkdGG


Generated by Claude Code

…Coq claims

With a stale or missing reports/noncoq_mechanized_status.json,
`generate-metrics.sh --fast` rebuilt every lane's *_COMPILED and
*_MECHANIZED_READY from the previous metrics.json claimLevels and from
smoke passes. A smoke pass therefore became a published "compiled" claim,
and every later fast run re-read that claim as evidence, so the overclaim
reinforced itself. This is what put Alloy at "compiled" during the PR #89
deploy, until the public claim-integrity gate refused it.

- The fallback now carries only descriptive fields: pending reasons, with
  "none" mapped to the stale-report reason; backlogs; and smoke results
  this run did not observe. Without a fresh report every non-Coq lane is
  generated, which public-quality-gates.sh already requires.
- Smoke checks record whether they actually ran, so a cached pass can no
  longer mask a smoke check that now fails.
- The report-compatibility rule now matches public-quality-gates.sh:
  content-identical lane paths, .md ignored, no ancestry requirement, and
  it fails closed on a missing commit or a failing diff.
- An Isabelle smoke pass no longer sets isabelleCompiled. The honesty
  policy that already covered F*, TLA+ and Alloy now covers Isabelle too.
  This flaw was masked only by the lane's retirement.

scripts/test-generate-metrics-fallback.sh runs the generator in a
throwaway clone. It fails 32 assertions against the previous generator
and passes against this one. Published claims are unchanged, because the
current report is fresh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E6roGMqnThhqeobMHTkdGG
@ib823
ib823 marked this pull request as ready for review October 12, 2026 03:37
@ib823
ib823 merged commit 68b6c50 into main Oct 12, 2026
11 checks passed
ib823 pushed a commit that referenced this pull request Oct 12, 2026
Regenerated metrics.json at 68b6c50 (fast mode, strict non-Coq report
path). Only generated/commit fields change; every count and claim level
is identical. Part 11 notes the PR #90 merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E6roGMqnThhqeobMHTkdGG
ib823 pushed a commit that referenced this pull request Oct 12, 2026
Byproducts of scripts/deploy-website.sh: metrics provenance stamp
(2fea4f5), the playground WASM rebuilt with the current compiler
(1,544,535 -> 1,707,344 bytes; it predated the PR #89 merge), and report
timestamps. The Dim1/Dim9 gate re-derived coq_theorem_count 54 -> 58.
Derived counts unchanged: 3,528 tests (full cargo test), 12,819 Qed.

Chain: gh-pages on ib823/riina 7298dc2 -> 35f41d8 (all public quality
gates PASS before and after the build).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E6roGMqnThhqeobMHTkdGG
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