You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sub-issue of #2870 (P-1.1). Remainder of #2699, per cop scoping (aprender-77, 09:15Z 2026-09-25).
Twelve producer build.rs files each hand-roll the CONTRACT_<C>_<E> key format. #2699 made aprender_contracts::build_helper::env_key public and tested it equal to the key the macro reads (contract_env_key!). Any hand-rolled copy that drifts binds nothing, silently.
done_when: every producer build.rs builds its keys with env_key, or build-depends on a crate that does. No format!("CONTRACT_…") key construction is left in any build.rs, and a guard fails if one reappears.
Measured while doing #4368 (commit ba895e0): 9 of the 10 producer build.rs files (aprender-compute, -core, -db, -orchestrate, -present-cli, -present-core, -rag, -serve, -train) read binding.yaml from ../../../provable-contracts/contracts/<crate>/binding.yaml. That sibling-repo path has been gone since APR-MONO, so each one emits CONTRACT_BINDING_SOURCE=none and no binding vars. Build-script output confirms it: keys=0 for all nine. Their #[contract] sites bind nothing (53 in aprender-core alone). In-tree, only contracts/aprender/binding.yaml exists. Repointing them turns on #4368's registry check and every YAML pre/postcondition for those sites, so expect #4371-class prose breakage. Scope is pending with the cop (aprender-77).
Phase 1 landed on batch/0.70.0 @12e86b1e1 (fold owner 59): all 12 producer build.rs now use provable_contracts::build_helper::env_key; aprender-contracts' own build.rs include!s the same src/env_key.rs. Guard build_helper::tests::no_build_rs_hand_rolls_the_contract_key (≥12 files scanned, case table); planted mutant in rag/build.rs → RED at :52. Key equality 3510/3522 identical; the 12 diffs are binding entries with contract ../gguf-format-…, unreadable under both builders (pre-existing). Still open (phase 2): producers read the sibling ../../../provable-contracts/contracts//binding.yaml, which resolves only on the main checkout, so worktrees/CI emit BINDING_SOURCE=none; vendoring in-tree + fail-loud turns enforcement on and needs measuring first.
All 10 producer build.rs files now read contracts/<name>/binding.yaml in-tree via CARGO_MANIFEST_DIR. The dead ../../../provable-contracts/ sibling path is gone. It resolved only on the main checkout, against a stale Aug-18 copy, so worktrees and CI ran with BINDING_SOURCE=none. This also fixes the main-checkout build of aprender-compute, which was failing on a missing wgpu-forward-pass-v1 row.
34 rows were added for #[contract] sites that had no row: aprender 26, realizar 6, trueno 1, entrenar 1 (cuda). 5 of them are status: partial because the contract they cite does not exist in-tree: forward-pass-v1, gemm-v1, sampling-v1, wgpu-forward-pass-v1, backward-pass-v1.
New guard: build_helper::tests::producer_bindings_are_in_tree. It is green on this commit and goes RED on both planted mutants (a reverted sibling path, and a missing binding file).
Verified on the rebased tree: cargo check --all-targets on the 10 producers passes (rc 0), --bin apr --features cuda passes (rc 0), fmt passes (rc 0), and the aprender-contracts lib passes 1779.
Out of scope, still sibling reads: serve's architecture-requirements-v1.yaml (falls back to the hand-written file) and tensor-names-v1.yaml (rerun-if-changed only).
evidence for close: 989cb01 (#4655), ancestor of main 6bd89b0. Checked at main: the test no_build_rs_hand_rolls_the_contract_key is in crates/aprender-contracts/src/build_helper.rs, and git grep 'format!("CONTRACT_' over crates/*/build.rs finds nothing; producers use env_key.
Activity
noahgift commentedon Sep 25, 2026
Measured while doing #4368 (commit ba895e0): 9 of the 10 producer build.rs files (aprender-compute, -core, -db, -orchestrate, -present-cli, -present-core, -rag, -serve, -train) read binding.yaml from
../../../provable-contracts/contracts/<crate>/binding.yaml. That sibling-repo path has been gone since APR-MONO, so each one emitsCONTRACT_BINDING_SOURCE=noneand no binding vars. Build-script output confirms it: keys=0 for all nine. Their#[contract]sites bind nothing (53 in aprender-core alone). In-tree, onlycontracts/aprender/binding.yamlexists. Repointing them turns on #4368's registry check and every YAML pre/postcondition for those sites, so expect #4371-class prose breakage. Scope is pending with the cop (aprender-77).refactor(contracts): producer build.rs keys via build_helper::env_key (…
noahgift commentedon Sep 25, 2026
Phase 1 landed on batch/0.70.0 @12e86b1e1 (fold owner 59): all 12 producer build.rs now use provable_contracts::build_helper::env_key; aprender-contracts' own build.rs include!s the same src/env_key.rs. Guard build_helper::tests::no_build_rs_hand_rolls_the_contract_key (≥12 files scanned, case table); planted mutant in rag/build.rs → RED at :52. Key equality 3510/3522 identical; the 12 diffs are binding entries with contract
../gguf-format-…, unreadable under both builders (pre-existing). Still open (phase 2): producers read the sibling ../../../provable-contracts/contracts//binding.yaml, which resolves only on the main checkout, so worktrees/CI emit BINDING_SOURCE=none; vendoring in-tree + fail-loud turns enforcement on and needs measuring first.fix(contracts): producer bindings read in-tree, registry enforced eve…
noahgift commentedon Sep 25, 2026
Phase 2 pushed to
batch/0.70.0@ 596f06d.contracts/<name>/binding.yamlin-tree viaCARGO_MANIFEST_DIR. The dead../../../provable-contracts/sibling path is gone. It resolved only on the main checkout, against a stale Aug-18 copy, so worktrees and CI ran with BINDING_SOURCE=none. This also fixes the main-checkout build of aprender-compute, which was failing on a missing wgpu-forward-pass-v1 row.#[contract]sites that had no row: aprender 26, realizar 6, trueno 1, entrenar 1 (cuda). 5 of them arestatus: partialbecause the contract they cite does not exist in-tree: forward-pass-v1, gemm-v1, sampling-v1, wgpu-forward-pass-v1, backward-pass-v1.build_helper::tests::producer_bindings_are_in_tree. It is green on this commit and goes RED on both planted mutants (a reverted sibling path, and a missing binding file).cargo check --all-targetson the 10 producers passes (rc 0),--bin apr --features cudapasses (rc 0), fmt passes (rc 0), and the aprender-contracts lib passes 1779.architecture-requirements-v1.yaml(falls back to the hand-written file) andtensor-names-v1.yaml(rerun-if-changed only).fix(car): three reds on f2bed7d — setfit binding rows, bashrs 7.4.1 f…
fix(contracts): 10 #[contract] producers read a sibling repo that no …
fix(contracts): the restored registries fed 236 ghosts to the binding…
fix(build): serve's arch-requirements and tensor-names reads, and thr…
chore(roadmap): PMAT-4380 entry for the #4369 + #4380 replay onto main
2 remaining items
split(#4502 PR-1): the #4369 build-dep in the 4 remaining crates
fix(split #4502 PR-1): Cargo.lock — add the #4369 build-dep edges (CI…
fix(build): watch only paths that exist, so cargo stops rebuilding ev…
roadmap(#4502 PR-1): rows for folded #4604 and #4369; regenerate the …
apr run: 7 defects incl.--streamemitting empty text and--trace-outputalways writing an empty event list #2378noahgift commentedon Oct 12, 2026
evidence for close: 989cb01 (#4655), ancestor of main 6bd89b0. Checked at main: the test no_build_rs_hand_rolls_the_contract_key is in crates/aprender-contracts/src/build_helper.rs, and git grep 'format!("CONTRACT_' over crates/*/build.rs finds nothing; producers use env_key.
noahgift commentedon Oct 12, 2026
Cop batch close (FLOW-004 drain, ≤43/d): fix verified on main — merged #4655 ; ancestor of origin/main: 989cb01 . Evidence: #4369 (comment)