Skip to content

fix(soundness): restore the #833 ledger row and drop a stale anchor (main is red) - #860

Closed
hyperpolymath wants to merge 1 commit into
mainfrom
claude/fix-main-soundness-ledger
Closed

hyperpolymath wants to merge 1 commit into
mainfrom
claude/fix-main-soundness-ledger

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

main is red: tools/check-soundness-ledger.sh fails on 464f7c6, and CI/gate failed on 220d6f1 and 0af0ab8. Two squash merges left the ledger inconsistent. This PR repairs it and changes nothing else.

What broke

Stamp

:ground-truth-sha: advances from 84eca60 to 464f7c6, current main, verified with this change:

dune runtest --force           → 849 + 32 + 3 tests, all pass
tools/run_codegen_wasm_tests.sh → 48 harnesses pass
tools/run_codegen_deno_tests.sh → 42 harnesses pass
tools/run_codegen_bun_tests.sh  → 9 harnesses + host_io_cli pass
just guard                      → exit 0; soundness ledger: all 5 properties hold

On unmodified origin/main, the same gate fails with the property-3 drift above.

Not changed

Note for the owner

Squash merges of PRs that each edit docs/SOUNDNESS.adoc and the anchors file can drop one side silently. A merge-queue, or making CI/gate a required check, would have stopped 220d6f1 from landing red.

https://claude.ai/code/session_01J4QvDfgDTxx9Bumfa2XXcQ


Generated by Claude Code

…main red)

On main (464f7c6), tools/check-soundness-ledger.sh fails (CI/gate red on
220d6f1 and 0af0ab8):

- property 3: tools/soundness-anchors.sha256 kept two lines for
  suite:test/test_intrinsic_shadow.ml. 3b74c20f... is the hash from
  before #829 extended that suite; 20e73d88... is the current one. Both
  survived the squash merges of #841 and #829. The stale line is removed.
- The squash of #843 (220d6f1) did not carry its docs/SOUNDNESS.adoc
  change, so the #833 row (fixed, anchored to test/test_interp_eval.ml)
  and its stamp bump were lost although lib/interp.ml changed. The row is
  restored verbatim from fix/833-interp-recursion-mut.

The stamp advances to 464f7c6, current main, verified with this change:
dune runtest --force 849 + 32 + 3 tests pass; the wasm, Bun-ESM (legacy)
and native Bun-ESM codegen corpora pass (48, 42, 9); just guard exits 0
with all 5 ledger properties OK.

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

gitnotebooks Bot commented Dec 1, 2026

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Dec 1, 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 38 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: e86496c7-9ec0-46a8-ae22-23281fa3e0e2
Commits

Reviewing files that changed from the base of the PR and between 464f7c6 and 68422f1.

Files selected for processing: 2

  • docs/SOUNDNESS.adoc
  • tools/soundness-anchors.sha256
  • 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 Dec 1, 2026

Copy link
Copy Markdown

Copy link
Copy Markdown
Owner Author

Superseded by #856, which makes the same repair (restores the #833 row, removes the stale test_intrinsic_shadow.ml digest, advances the stamp) and also runs the stdlib utf8 fit case on the interpreter. Closing this one so two PRs do not compete for docs/SOUNDNESS.adoc.


Generated by Claude Code

hyperpolymath added a commit that referenced this pull request Dec 2, 2026
…ubical v0.8) (#861)

Owner decision (relayed): install Agda 2.7.0.1 plus the latest
compatible agda/cubical, recheck `formal/agda/`, and show the proofs fit
the estate's Agda scheme.

## Pins
| | |
|---|---|
| Agda | **2.7.0.1**, official static binary
`Agda-v2.7.0.1-linux.tar.xz` (agda/agda tag `v2.7.0.1`, commit
`a6fc20c2…`). SHA-256
`975b515a14877ab6bce5bfc641e16c4a3ee52ca5d7f846577dee80aa2145db8a`,
verified in CI before unpacking. |
| agda/cubical | **v0.8**, commit
`3291fc1d8cae1409cc54d4f9cca7366158b573d7`. cubical's README pairs v0.8
with 2.6.4.1/2.7.0.1; v0.9 and master need Agda 2.8.0. Fetched by SHA,
`HEAD` asserted. |

## Results (Agda 2.7.0.1)
- `QttSemiring.agda`, `BorrowProvenance.agda`: exit 0, **no warnings**,
under `--safe --without-K --cubical-compatible`. **No repairs needed. No
proof or statement text changed.**
- `check-agda-controls`: all 5 planted failures still fail. The
`indexed` control still fails because 2.7.0.1 prints
`UnsupportedIndexedMatch`, and the gate rejects that output.
- New `formal/agda-cubical/CubicalCompat.agda` (`--safe --cubical`,
depends on `cubical-0.8`) imports both modules and re-exports theorems
from each. It also uses them as cubical `Path`s via
`eqToPath`/`pathToEq`, including a funext path between `qplus` and its
flip. It checks clean.
- `check-agda-cubical-controls`: 5 planted failures, each fails. One is
a source that drops `--cubical-compatible`; Agda refuses it with
*"Importing module QttSemiring not using the --cubical-compatible flag
from a module which does"*. Another is a module the fixture doesn't
import. So the check is load-bearing, and new theory modules must join
the fixture.
- The whole CI job was replayed locally from a fresh download and a
fresh cubical fetch, and all 4 recipes passed.

## Decision: stay `--cubical-compatible`
Nothing was ported to full `--cubical`. `--cubical-compatible` is the
flag that makes a module importable from cubical code, so the import
itself proves usability. Porting would leave the PROOF-POLICY theory
lane, add a library to the import cone, and cut the Rocq/Lean legs for
cubical-primitive statements. Rationale is in `formal/agda/README.adoc`.

## CI
`agda-proofs` job (`coq-proof-gate.yml`) now uses the pinned binary and
cubical, and runs 4 recipes. No `uses:` ref changed, so `actions.lock`
is unchanged and `check-actions-lock.sh` passes.

## Not established / honest limits
- Still **`ungraded`**: no receipt, no Lean leg.
- The binary digest is trust-on-first-use. The agda/agda release page
and API weren't reachable from the session, so the digest wasn't
compared with GitHub's published asset digest. Worth confirming by
someone with access.
- The nine `BorrowProvenance` mutations were not rerun on 2.7.0.1.
- `just check`: lint and `dune runtest` (849 tests) pass. `guard` fails
at `check-soundness-ledger.sh` with anchor drift. That failure
reproduces on clean `origin/main` and is being repaired in #860, which
this PR doesn't touch.

Commit is unsigned; owner to re-sign.

---
_Generated by [Claude Code](https://claude.ai/code)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
@hyperpolymath
hyperpolymath deleted the claude/fix-main-soundness-ledger branch December 2, 2026 15:42
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