Skip to content

smoke-gate: theorem_matrix_ok is a hardcoded true (false green), and validate_lean_standalone has no phase body #2306

Description

@gHashTag

Follow-up to #2304 (fixed in #2305). While fixing dry_run_sweep_ok I read the whole smoke_gate() verdict through. The #2228 batch merge dropped three phase bodies, not one. #2305 restored the first. The other two are still on master, and one of them fails open.

All line numbers are against master @ d51db4ac10d38169449535067d0b831acd8a01c5.

1. theorem_matrix_ok is a hardcoded true — this is a false green

6101:    let theorem_matrix_ok = true;
6342:        && (!run_theorem_matrix || theorem_matrix_ok)

Those are its only two mentions. There is no theorem-matrix phase body anywhere in smoke_gate(). So when a caller passes --theorem-matrix, the gate reports that phase passed without executing a single line of it.

This is the more serious of the two. dry_run_sweep_ok failed closed — unpassable, loud, and it blocked CI for 12 runs until someone looked. theorem_matrix_ok fails open: it is a conjunct that can never be false, so it silently certifies work that never happened. It is the same absence-is-not-a-value defect closed in #2285, #2287 and #2302, except the gate is asserting success rather than refusing to look.

The three helper functions that phase would have called are still in the file, defined and never called — which is the evidence that a body was removed rather than never written:

6372: fn generate_theorem_matrix(
6509: fn replay_theorem_matrix(
6610: fn build_theorem_matrix_report(

The compiler has been saying so on every run:

warning: function `generate_theorem_matrix` is never used
warning: function `replay_theorem_matrix` is never used
warning: function `build_theorem_matrix_report` is never used

report["theorem_matrix"] is likewise never written; it keeps the null from its initializer at 5970.

2. validate_lean_standalone_ok — same two-mention shape, no success point

6100:    let mut validate_lean_standalone_ok = false;
6343:        && (!validate_lean_standalone || validate_lean_standalone_ok)

Its phase body is absent too, so unlike dry_run_sweep_ok this one cannot be fixed by mirroring verify_lean_ok — there is no success point to attach an assignment to. The phase has to be written back.

It fails closed, and it is currently masked twice over: the conjunct is guarded by !validate_lean_standalone, and both of its tests return early when lake is not on PATH:

test fpga::tests::test_smoke_gate_json_synthetic_validate_lean_standalone ... ok
test fpga::tests::test_smoke_gate_validate_lean_standalone_matches_snapshot ... ok

Those two ok results are skips, not passes. SKIP: lake not on PATH. The moment a runner has lake installed, both fail — the tests assert validate_lean_standalone is an object with status: "ok" and an elapsed_ms, and nothing ever writes that key.

Note this is exactly how #2304 stayed invisible: a test that returns early reads as green.

Why these did not surface with #2304

--theorem-matrix and --validate-lean-standalone are not exercised by the cli-tri build job, and both conjuncts are guarded, so neither affects the check that #2305 turned green. They are latent, not active.

Suggested order

  1. theorem_matrix_ok first — it is a live false-green today, not a latent one. Either restore the phase body from the pre-fix(tri): restore the seven definitions a batch merge dropped #2228 commit, or, if the phase is not coming back, delete the flag and its conjunct together with the three orphaned helpers. What it must not stay is a hardcoded true sitting in a verdict.
  2. validate_lean_standalone_ok — restore the phase body; its tests already specify the required report shape (status: "ok" plus elapsed_ms), so they define the target.
  3. Consider whether the guarded-conjunct idiom (!run_x || x_ok) is worth keeping. It is what let two missing phases sit unnoticed: a phase that does not exist and a phase that was not requested are indistinguishable in the verdict.

Recovering the dropped bodies from the #2228 parent commit is likely faster than rewriting, the way 494e659d8 supplied verify_lean_ok.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions