Skip to content

caps: verify oracle-sync finding, fix main mixed-param-list MISMATCH - #24

Merged
Ch4s3 merged 2 commits into
mainfrom
claude/march-lean-oracle-sync-30e15a
Aug 14, 2026
Merged

Ch4s3 merged 2 commits into
mainfrom
claude/march-lean-oracle-sync-30e15a

Conversation

@Ch4s3

@Ch4s3 Ch4s3 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Verifies the oracle-sync finding filed 2026-08-10, which predicted reject/t166_grant_narrow_violated_by_helper (and a since-renumbered sibling) would be hard MISMATCHes against march's grant check. Checked directly against a fresh march build off origin/main (9d481cb3), since this branch's CI still pins the pre-grant-check 6867c783.

  • Prediction refuted, but not for a comforting reason. t166 and its stage-C/D siblings (t174_fn_grant_violated_by_helper, t176_main_no_grant_does_io) all use file_write, a builtin Infer.lean doesn't type — so they honestly skip before the (missing) grant check would matter. Newly-observed skips (these plus a few unrelated SIMD-lane fixtures that landed in the same window) are now ledgered in scripts/expected-skips.txt.
  • A different, real MISMATCH turned up in the same run: reject/t177_main_mixed_param_list (fn main(cap : Cap(IO), n : Int)). R1 stage D's rule that main's parameter list is zero-or-more capabilities, never a mix, was entirely unmodeled — the checker fell through every existing check to .ok. Fixed with mainMixedParamsViolation in MarchLean/CapCheck.lean, wired in as check R1-D, mirroring Desugar.check_main_signature. Verified against march directly; stage-D's multi-cap accept fixtures are unaffected.
  • The deeper gap is confirmed live, not fixed. A hand-built probe (main granted Cap(IO.Clock), a helper reaching IO.Console via println — the one IO builtin Infer.lean actually types) is a genuine false-accept: march rejects, march-lean-check accepts. The transitive grant-reach check (R1 stages A–C) has zero implementation in CapCheck.lean; it's invisible to the corpus only because every corpus witness happens to route through an untyped builtin. Not attempted in this PR — it's comparable in size to several existing checks combined, and a rushed version risks trading a false-accept for a false-reject. Full write-up, probe, and fix shape in specs/march-findings.md §6.

Full conformance harness (383 files incl. grammar/golden extras, run against march origin/main): MISMATCH: 0, SKIP-LEDGER: OK, RESULT: PASS.

Test plan

  • lake build — clean
  • t177_main_mixed_param_list rejects (was accept)
  • stage-D multi-cap accept fixtures (t174-t176 accept-side) unaffected, still skip on file_write
  • Full scripts/conformance-harness.sh run against march origin/main (fresh build) + --lang-dir extras: 383 files, MISMATCH: 0, SKIP-LEDGER: OK, RESULT: PASS
  • Hand-built probe confirming the remaining transitive-grant-reach gap is a live false-accept (documented in specs/march-findings.md §6, not a corpus file)

Ch4s3 added 2 commits August 13, 2026 17:21
…nc finding

Verified the 2026-08-10 oracle-sync finding directly against march
origin/main (a fresh build, since this branch's CI still pins the
pre-grant-check 6867c783): the specific predicted MISMATCHes
(reject/t166 and its stage-C/D siblings) don't happen — every one of
those witnesses uses `file_write`, a builtin Infer.lean doesn't type,
so they honestly skip before the missing grant check would matter.
Ledgered in expected-skips.txt.

The full run against current march did turn up a real, different hard
MISMATCH: reject/t177_main_mixed_param_list (`fn main(cap: Cap(IO), n:
Int)`) — R1 stage D's main-signature rule was entirely unmodeled.
Fixed with mainMixedParamsViolation (CapCheck.lean, wired in as R1-D),
mirroring Desugar.check_main_signature.

The deeper gap remains open: a hand-built probe (main granted
Cap(IO.Clock), a helper reaching IO.Console via the one IO builtin
Infer.lean does type, println) confirms the transitive grant-reach
check itself is a live false-accept, not just corpus-masked. Not
attempted here — write-up and fix shape in specs/march-findings.md §6.
…ates them

PR #24's first CI run failed: I'd ledgered t166/t169-t172/t174/t176
(reject) and t173-t176 (accept) as expected skips, but this repo's CI
(conformance.yml:139) still pins march at 6867c783, which predates
every one of those fixtures entirely — they don't exist in CI's
checkout, so the ledger entries were stale by construction.

Verified against the exact pinned commit (built march at 6867c783
directly, ran the harness with --lang-dir exactly as CI does): 369
files, MATCH 94, MISMATCH 0, SKIP-LEDGER OK, RESULT PASS — matches
CI's own MATCH/MISMATCH counts from the failed run.

The mainMixedParamsViolation fix (previous commit) is unaffected and
still verified: t177 doesn't exist at this pin either, so the check is
simply inert here, not wrong. march-findings.md corrected to say these
skips are NOT ledgered yet, and why.
@Ch4s3
Ch4s3 merged commit cecd8a7 into main Aug 14, 2026
1 check passed
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.

1 participant