Skip to content

v0.5.26 — Deterministic regenerate-all pipeline (Loop 6) - #138

Merged
cschanhniem merged 1 commit into
mainfrom
loop-6-regenerate-all
Jul 5, 2026
Merged

cschanhniem merged 1 commit into
mainfrom
loop-6-regenerate-all

Conversation

@cschanhniem

Copy link
Copy Markdown
Collaborator

Chosen bottleneck

Bottleneck: No script to regenerate all derived outputs deterministically. The committed baseline could drift from what the pipeline actually produces.

Class: Reproducibility / structural integrity

Why it matters

Reproducibility is a core project value. A make regenerate-all target proves that running the full pipeline from versioned inputs produces exactly the committed outputs. This is the reproducibility check that every loop should pass before claiming progress.

Changes

New: scripts/regenerate_all.py

  • Runs 11 make targets: demo, validate-scoring (3 variants), bench-leakage, bench-cluster-split, bench-expert-ablation, bench-selectivity, bench-triage, bench-feature-decomp, metrics-snapshot
  • Uses git diff --exit-code on tracked outputs to verify determinism
  • Supports --update flag to auto-stage new baselines
  • Clean modular functions: run_make(), run_targets(), check_determinism()

New: tests/test_regenerate_all.py (11 tests)

  • Hash stability, content sensitivity, known-good/bad targets, determinism pass/fail, help flag, skip-targets mode

Updated: Makefile, docs/50_LOOP_PLAN.md

  • make regenerate-all target, help text, .PHONY
  • Loop 6 marked complete, position advanced to Loop 8, status v0.5.26

Verification

  • 1700 tests passing (+11 new)
  • make regenerate-all runs all 11 targets, pipeline deterministic (exit 0)
  • All benchmark outputs identical to committed baseline

Phase 0 completion status

  • ✅ calibration GateVerdict export works
  • ✅ make ci with benchmark gate passes
  • ❌ Loop 8 (CONTRIBUTING.md/PR template) remaining

Recommended next loop

Loop 8: CONTRIBUTING.md with safety-first contribution checklist and PR template. This closes Phase 0.

Add PYTHONPATH=src .venv/bin/python scripts/regenerate_all.py
=== Regenerating all derived outputs ===
  OK:   make demo
  OK:   make validate-scoring
  OK:   make validate-scoring-phase3
  OK:   make validate-scoring-strict
  OK:   make bench-leakage
  OK:   make bench-cluster-split
  OK:   make bench-expert-ablation
  OK:   make bench-selectivity
  OK:   make bench-triage
  OK:   make bench-feature-decomp
  OK:   make metrics-snapshot

PASS: All tracked outputs unchanged — pipeline is deterministic target that runs all 11 pipeline + benchmark targets
in sequence and verifies that tracked outputs (metrics_snapshot.json) are unchanged.

New:
- scripts/regenerate_all.py: standalone script that runs make demo, validate-scoring
  (3 variants), bench-leakage, bench-cluster-split, bench-expert-ablation,
  bench-selectivity, bench-triage, bench-feature-decomp, and metrics-snapshot.
  Uses  to verify determinism. Supports --update flag
  for committing new baselines and --skip-targets for CI-only verification.
- tests/test_regenerate_all.py: 11 tests covering sha256, run_targets, run_make,
  check_determinism (pass/fail), help flag, and --skip-targets with mocked snapshots.
- Makefile regenerate-all target

Total tests: 1700 passing (+11 from v0.5.25)
docs/50_LOOP_PLAN.md: Loop 6 marked complete, position advanced to Loop 8
@cschanhniem
cschanhniem merged commit 9047acb into main Jul 5, 2026
1 check failed
@cschanhniem
cschanhniem deleted the loop-6-regenerate-all branch July 5, 2026 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant