Skip to content

Epic: pv / provable-contracts hardening — the tool that decides release soundness #2556

Closed
1 of 1 issue completed

Description

@noahgift

owner: aprender-df

Umbrella for the pv / provable-contracts hardening work. pv is the tool that decides
whether a release is contractually sound, so a defect in pv is a defect in every
release verdict it has ever issued.

The through-line across this work: pv reported the wrong number → pv silently dropped
what you wrote → pv accepts contracts that assert nothing.
Each item below is one step
along that line.

Shipped

  • fix(pv): pin pv to a HEAD build — the release receipt was citing pv 0.49.0 #2552 — pv was pinned to a HEAD build. pv on PATH was 0.49.0 while the
    in-tree crate was 0.63.0, and the two disagree on the gate that matters:
    strict-test-binding reports 253 refs / 51 missing under the stale binary and
    371 / 27 under HEAD. dogfood_surfaces.sh printed pv present (pv 0.49.0) into
    the release receipt as evidence of correctness, and Makefile:352 ran bare
    pv lint as the hard release gate. Adds scripts/pv_bin.sh (cargo is the freshness
    authority, not a version string — pv was rebuilt three times at the same version
    with two distinct md5s giving different answers on an identical tree) and extends
    check_apr_bin_pinned.sh with BARE-PV/PATHRES-PV classes.

In flight

  • fix/pv schema #2554 — three silent-drop defects in the contract schema: keys serde discards
    without complaint, so contracts assert things nothing will ever evaluate. The guard's
    own hermetic fixture turned out to be one of the 119 offenders — it stopped parsing
    and every case in its table went silently unreported.
  • fix/pv facades #2553 (implements Publish provable-contracts{,-cli,-macros} as facade crates so existing users are carried forward, not stranded #2546) — provable-contracts{,-macros,-cli} carried
    forward as crates.io facades. The headline deliverable was found broken: the published
    CLI facade cannot compile, because it calls aprender_contracts_cli::run() while
    the pinned 0.63.0 is on crates.io bin-only. Invisible to the guard because every
    check builds through the path dep, while a published consumer resolves from the
    registry.

Open defects

Structural work

  • A contract kind that carries proof obligations and cannot be exempted by
    registry: true
    . Today provability_violations() applies only to
    ContractKind::Kernel and the registry exemption also keys on Kernel — so choosing
    Kernel lets you self-exempt (481 contracts do), and choosing anything else escapes the
    obligation entirely. Both roads end at a contract that proves nothing. This blocks the
    competitive-parity mandate, which is otherwise unenforceable.

Housekeeping

  • .pv/contracts.idx, .pv/contracts.idx.mtime, .pv/lint-previous.json are
    generated caches tracked in git. They have conflicted in three separate rebases
    this week. Either untrack them or make the ratchet read from a non-conflicting form.

Standing rule

Every fix here must be mutation-verified in both directions, with proof the mutation
engaged. This week produced eleven controls that existed and enforced nothing; a
validator change nobody has watched go RED is simply the next one.

Activity

  1. noahgift commented on Aug 21, 2026

    @noahgift
    MemberAuthor

    Operator ruling 2026-08-21: no exceptions. The registry: true provability exemption is removed — tracked as #2557.

    Measured blast radius, and it argues for the decision: of the 500 currently-exempt contracts, 434 (87%) already carry falsification structure and are exempting themselves needlessly. The genuine debt is 66, not 500. Removing the exemption mostly starts counting work that already exists.

    This unblocks the structural item in this epic: there is currently no way to write a contract that must prove something.

  2. noahgift commented on Aug 21, 2026

    @noahgift
    MemberAuthor

    Added #2558 — the pv binary-name collision, which is a distribution defect rather than a validator one and belongs in this epic.

    Three claimants on one name, resolved by last-install-wins:

    1. aprender-contracts-cli declares [[bin]] name = "pv" (main)
    2. provable-contracts-cli (the facade on fix/pv facades #2553) declares it too — both install ~/.cargo/bin/pv, second one silently overwrites
    3. pv(1), the Unix pipe viewer, which cargo's own PATH guidance puts us ahead of

    Live on this box right now: ~/.cargo/bin/pv is 0.49.0 from Jun 13, 69 days stale against an in-tree 0.63.0, and the two disagree on strict-test-binding (253/51 vs 371/27).

    Worth being precise about the limit of #2552: it pins what our scripts invoke, and it does nothing about what a user gets. Same defect class, different surface — which is the pattern this epic keeps rediscovering.

    apr pv already exists and works, so the in-apr route is settled; only the naked binary and the facade duplicate are open.

  3. noahgift commented on Aug 21, 2026

    @noahgift
    MemberAuthor

    #2558 substantially expanded. The finding that changes it: pv is an existing crates.io crate — a Rust pipe-viewer reimplementation, bin_names: ["pv"], 7,065 downloads, first published 2019, still being released as of 2025-07-19.

    So we are the newcomer and the minority on this name: the pipe viewer's crate has 15x the downloads of provable-contracts-cli (463). Four claimants, one path, last-install-wins.

    Also recorded there, because it is the reusable lesson: #2552 pinned what our scripts invoke and nothing about what a user gets. Two surfaces, one defect, and fixing the first reads as fixing both.

  4. added a commit that references this issue on Aug 23, 2026
  5. added this to the 0.69.0 milestone on Sep 10, 2026
  6. added
    automationBot-maintained dashboard, not a defect — skip in triage
    P1High priority
    on Sep 11, 2026
  7. modified the milestones: 0.69.0, 0.73.0, 0.70.0 on Sep 17, 2026
  8. noahgift commented on Sep 23, 2026

    @noahgift
    MemberAuthor

    triage 2026-09-23 (aprender-dd, standing triage owner): milestoned to 0.70.0, theme Fast Train (CI, gates, pv, release tooling, hygiene); it moved out of backlog (the 2026-09-17 overflow bucket, not a release).

  9. added
    kind:triageEpic, tracker, decision or hygiene work (derived rule, #4159)
    on Sep 24, 2026
  10. modified the milestones: 0.70.0, backlog on Sep 24, 2026
  11. noahgift commented on Sep 24, 2026

    @noahgift
    MemberAuthor

    Folded into this epic by issue triage (evidence /mnt/nvme-raid0/cop-inbox/evidence/triage-1418.md). Each row was a separate issue, now closed as folded; reopen any if it needs its own thread:

  12. noahgift commented on Sep 24, 2026

    @noahgift
    MemberAuthor

    Folded into this epic by issue triage (evidence /mnt/nvme-raid0/cop-inbox/evidence/triage-1623.md). Each row was a separate issue, now closed as folded; reopen any if it needs its own thread:

  13. noahgift commented on Sep 25, 2026

    @noahgift
    MemberAuthor

    Triage (aprender-df, owner), 2026-09-25, measured on batch/0.70.0 @10f531a0d

    Item State Evidence
    #2552 pv pinned to HEAD SHIPPED merged 2026-08-20
    #2553 / #2546 facades SHIPPED #2553 merged 2026-08-21; #2546 closed
    #2554 schema silent drops SHIPPED folded verbatim into #2613 (0.64.0 batch)
    #2555 pv validate accepts bogus CRUX fields CLOSED, completed 2026-08-23
    #2512 contract-test-binding runs in no CI CLOSED check_contract_test_binding.sh is invoked in ci.yml
    .pv/ caches tracked in git DONE git ls-tree finds nothing under .pv/; .gitignore has **/.pv/ (#2644)
    Inert contracts (legacy falsification: block, 0 falsification_tests) OPEN, no gate 408 (the epic said 413); fix/pv-inert no longer exists on the remote
    Kernel + registry: true self-exemption OPEN, no gate, growing 512 (the epic said 481)

    Counts come from pv's own parser (parse_contract, legacy_falsification_entries, metadata.kind == Kernel && metadata.registry) over all 1881 contract files, recursively; 1878 parse. An independent YAML count matches exactly.

    EV order:

    1. A shrink-only ratchet on both counts in validate_contracts.rs, which already runs in CI. Neither count can grow while the fix is designed. This is in progress now and goes into batch/0.70.0.
    2. The structural fix, a proof-carrying kind that registry: true cannot exempt. This is a schema design decision (what the 512 migrate to), so it goes to the cop for a ruling before any code.
    3. Migrate the 408 legacy blocks into falsification_tests, in batches, lowering the ceiling each time.
  14. noahgift commented on Sep 25, 2026

    @noahgift
    MemberAuthor

    Ratchet landed on READY branch wip/2556-pv-hardening @d099b86ca (off batch/0.70.0), for the fold owner: ceilings 512 self-exempt / 408 inert, parsed floor 1850. Mutation proof 3/3 RED (+1 self-exempt, +1 inert, empty walk), and the detector-off control stays green. It also fixes the batch's contract_data_integrity red (445 > 444, FALSIFY-VERSION id order). Parked (backlog) by cop reassignment to 0.71.0; the next items are the structural kind ruling, then migrating the 408 legacy blocks.

  15. noahgift commented on Sep 27, 2026

    @noahgift
    MemberAuthor

    Closed as absorbed into #2870 (the S2 standing epic, owner aprender-57). Every item this epic cites is closed or merged (#2512, #2546, #2552, #2553, #2554, #2555), plus #2978. Verified by aprender-df.

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

    P1High priorityautomationBot-maintained dashboard, not a defect — skip in triagekind:triageEpic, tracker, decision or hygiene work (derived rule, #4159)

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions