The library

Rendered from docs/reports/2026-09-26_post-draft-gate-sweep-plan-review.md; the markdown file is the record.

  1. Critical — E_TIERS is referenced before assignment. The proposed CANDIDATES literal uses E_TIERS before defining it, so importing the module raises NameError. Define it before CANDIDATES.

  2. Critical — Pareto selection compares different populations. Each candidate may use a different intersection, but pareto_pick compares their absolute six-cell scores. A candidate evaluated on easier rows can appear dominant. Require identical evaluation populations for the final comparison, or report the passers as incomparable and recommend KEEP. Add a test with differing row sets.

  3. Critical — Export validation does not enforce the fold contract. build trusts exported split values without checking fold against splits/nsa_folds.csv; fs.load also silently drops duplicate paths. Validate normalized path uniqueness, split/fold assignments, labels, and finite logits before deduplication or ranking. Require provenance tying the new export to the approved fold-based training run. Otherwise mislabeled holdout rows can enter rank references and Platt fitting.

  4. Critical — Partial test coverage can qualify a candidate. test_agreement checks that supplied names exist in the shipped TSV, but not that all required names are supplied exactly once. An incomplete export can receive a favorable Spearman on a subset and become the winner. Require complete, unique test coverage before recommendation or writing constants; test missing rows and duplicate basenames.

  5. Critical — Invalid candidates lack a defined failure path. The direction guard raises, and malformed or single-class splits can abort the entire sweep before its report is written. Non-finite Spearman is also dangerous: NaN < 0.974 is false, bypassing doubled thresholds. Define candidate-local INVALID handling, reject non-finite diagnostics explicitly, and continue evaluating independent candidates. Test that an invalid P_wl still leaves W4’s result and the report intact.

  6. Critical — Ratification is not bound to the locked inputs. --write reruns the sweep against mutable exports, overwrites the report, and accepts any existing --new-column-model directory. Neither the manifest commit nor the heads chat’s code commit identifies the actual score and model bytes. Record input/model hashes in the locked packet and refuse writing if they change or the supplied model does not match the evaluated export.

  7. Critical — H_noise has no executable diagnostic. The candidate loop evaluates it whenever its export exists, but the diagnostic section assumes it remains NOT RUN. The governing manifest requires noise AUC ≥ 0.90 and clean AUC within 0.005 of v5, with missing evidence failing rule 5. Implement that evidence check or explicitly disable H_noise; never infer diagnostic success from export availability.

  8. Suggestion — Threshold search omits the always-real decision. Searching only np.unique(s) excludes a threshold above the maximum score, although min_cost includes that operating point. For an uninformative or constant column, the selected threshold can therefore disagree with the reported minimum and distort new_catches. Include +inf and test constant scores and ties.

  9. Suggestion — Verification uses Git to check ignored model files. models/ is gitignored, so git status --short models/ cannot establish that fusion constants stayed unchanged. Compare hashes before and after execution, and add write-path tests for a failing candidate, a passing but unselected candidate, and successful serialization to the intended target.

  10. Critical — The closing decision and stop behavior are missing. Step 6 ends with presentation around 19:30, without implementing the manifest’s KEEP log row or explicitly handing off the blocked TSV work. Add a hard stop for late exports or failed checks, the 20:00 ratification cutoff, and a terminal record: KEEP with the verified existing TSV and log note, or a named integration owner/blocker requiring parity, a new immutable TSV, and its log row by 21:30.