Skip to content

PVL: gate Comparator.lean --self-test (FIPS sha256 vectors) — nothing runs it today #4238

Closed

Description

@noahgift

The comparator hash binds proof to statement via a pure-Lean sha256 (A-7b.2). lake env lean --run scripts/Comparator.lean --self-test checks the three FIPS 180-4 vectors, but no gate executes it: a regressed sha256 would still hash consistently and pass. Fix: run --self-test in EV-8a's pv discharge run (before compare) and/or EV-9's lambda accept step; rc≠0 ⇒ RED. Target EV-8a (#4202).

Carried minor from the EV-7b (#4201, PR #4237) quorum round 2 on 8506831 (degraded same-family, 3/3 PASS). Filed by aprender-98 at cop ruling 2026-09-24.

Activity

  1. added this to the 0.70.0 milestone on Sep 24, 2026
  2. noahgift commented on Sep 24, 2026

    @noahgift
    MemberAuthor

    aprender-98: folded into B3 (PR #4317, fold/b3-contracts-ont-docs @ 5f4c2f9) by cherry-picking from origin/fix/4239-discharge-lake-timeout (69536ce #4239, 2cc8f36 #4238). cargo test -p aprender-contracts-cli --lib discharge 21/21 pass. Mutant: with the lake deadline disabled, 2 tests go red (hung elaboration, held pipe), so it is killed. Closes when B3 lands.

  3. noahgift commented on Sep 24, 2026

    @noahgift
    MemberAuthor

    Already fixed on fold/b3-contracts-ont-docs (PR #4317) by 5f4c2f9: pv discharge run calls self_test() (discharge.rs:367) before any comparator row. A nonzero exit, a timeout, or fewer than 3 FIPS vector lines rejects the run. Verified 20:0xZ: the_comparator_self_test_gates_the_rows passes, and turns RED (panics at :1619) with the call mutated out. #4317 carries no Closes #4238, so this issue will not auto-close. Close it when #4317 lands.

  4. modified the milestones: 0.70.0, 0.70.1 on Sep 25, 2026
  5. noahgift commented on Sep 25, 2026

    @noahgift
    MemberAuthor

    Moved 0.70.0 → 0.70.1 per the cop ruling on the 0.70.0 burndown (aprender-77, 2026-09-25). This issue is not on the critical path of any 0.70.0 gate (ONT-001, all [[bin]]s #4189, discharge --strict, merge-back #4338). Burndown: /mnt/nvme-raid0/cop-inbox/aprender-ea-070-burndown.md — aprender-ea

  6. noahgift commented on Sep 25, 2026

    @noahgift
    MemberAuthor

    Already implemented on fold/b3-onto-main (PR #4431, auto-merge armed). discharge.rs runs lake env lean --run scripts/Comparator.lean --self-test before trusting any row, and requires all 3 FIPS vector lines. A failing, hung or partial self-test rejects the run, and there is a test for each case (discharge.rs ~526-547, 1410, 1921-1945). This closes when #4431 merges. — aprender-ea

  7. modified the milestones: 0.70.1, 0.71.0 on Oct 4, 2026
  8. noahgift commented on Oct 12, 2026

    @noahgift
    MemberAuthor

    Done on main. Closing with evidence.

    A regressed sha256 now turns the discharge run red instead of hashing consistently.

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions