Complete GP manuscript checks and verify revision artifacts

Move the comparator definitions and core evidence into the main text and
lead with effect sizes and intervals. Preserve the locked verdicts and
record the independent GP-D referee report.

Archive the saved GP results and regenerate 43 outputs in the clean
room. Add a source-backed numerical guard for the submission and
record the correction to anchor warp RMSE and the scope of the pooled
blind-well power estimates.

Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
2026-11-18 04:08:10 +00:00
parent eff975cc96
commit 1985fcfa02
19 changed files with 28322 additions and 89 deletions

View File

@@ -147,6 +147,21 @@ RULES = [
("lambda_limit/*", "f3_results", "scripts/41_lambda_limit.py"),
("point_tie/*", "f3_results", "scripts/44_point_tie_arm.py"),
("band_spectra/*", "f3_results", "scripts/40_band_spectra.py"),
# Saved cells and summaries for the exploratory GP revision. Keep mixed field tables with Volve.
("gp_review/*.npz", None, ""),
("gp_review/a7/*", "volve", "scripts/51_gp_review.py --stage a7"),
("gp_review/a_results.md", "volve", "scripts/51_gp_review.py"),
("gp_review/a_sections.json", "volve", "scripts/51_gp_review.py"),
("gp_review/tables/field_wells.tex", "volve", "scripts/55_gp_field_table.py"),
("gp_review/tables/misspec.tex", "f3_results", "scripts/56_gp_misspec_table.py"),
("gp_review/tables/anchornoise.tex", "f3_results", "E1 table formatted from scripts/54_gp_anchor_noise.py summary"),
("gp_review/a[1-9]/*", "f3_results", "scripts/51_gp_review.py"),
("gp_review/e1/*", "f3_results", "scripts/54_gp_anchor_noise.py"),
("gp_review/e2/*", "f3_results", "scripts/53_gp_practitioner_tie.py"),
("gp_review/e[456]/*", "f3_results", "scripts/52_gp_experiments.py"),
("replication/train/*/cells/*.csv", "f3_results", "scripts/run_r6.sh"),
("replication/arms/*.csv", "f3_results", "scripts/run_r6.sh arms"),
("r6/a1_nstar.csv", "f3_results", "scripts/48_r6_cheap.py"),
# P3 F3 field test (protocol_f3; reproduce from tag protocol-f3)
("p3/summary/predictions.npz", "f3_predictions", "scripts/20_summarize_f3.py"),
("p3/summary/*", "f3_results", "scripts/20_summarize_f3.py"),
@@ -194,6 +209,12 @@ STEPS = [
("referee_r5_f2", ["scripts/45_referee_r5_followups.py", "--stage", "f2"], "files"),
("lambda_limit_summary", ["scripts/41_lambda_limit.py", "--stage", "summary"], "files"),
("point_tie_summary", ["scripts/44_point_tie_arm.py", "--stage", "summary"], "files"),
("gp_review_a_tables", ["scripts/51_gp_review.py", "--repro-tables"], "files"),
("gp_review_e456_summary", ["scripts/52_gp_experiments.py", "--stage", "summary"], "files"),
("gp_review_e2_summary", ["scripts/53_gp_practitioner_tie.py", "--stage", "summary"], "files"),
("gp_review_e1_summary", ["scripts/54_gp_anchor_noise.py", "--stage", "summary"], "files"),
("gp_review_field_table", ["scripts/55_gp_field_table.py"], "files"),
("gp_review_misspec_table", ["scripts/56_gp_misspec_table.py"], "files"),
("figures_main", ["scripts/22_paper_figures.py"], "figures"),
("figures_bench", ["scripts/38_bench_figures.py"], "figures"),
("s8_flipband", ["scripts/38_bench_figures.py", "--flipband"], "stdout"),
@@ -202,6 +223,29 @@ STEPS = [
REPO_OUTPUTS = {"bench_tables": ["benchmark/reference/cells.csv", "benchmark/reference/main_table.md"]}
NO_CODE = ("logs/", "refs/", "code_thesis/", "outputs_thesis/", ".agents/")
# A stage that silently skips a missing input must not pass by leaving an extracted output in place.
GP_EXPECTED = {
"gp_review_a_tables": (
"a1/a1_point_ties.csv", "a1/a1_warp_checks.csv", "a2/a2_budgets.csv", "a3/a3_transfer.csv",
"a3/a3_decision.json", "a4/a4_band_ratios.csv", "a4/a4_spectra.csv", "a5/a5_flags.csv", "a5/a5_f3.csv",
"a6/a6_nstar.csv", "a6/a6_f2_power.csv", "a7/a7_wells.csv", "a8/a8_pooled.csv", "a9/a9_gaussian_bank.csv",
),
"gp_review_e456_summary": (
"e4/optimizer.csv", "e4/ratios.csv", "e4/reading.json", "e4/summary.md",
"e5/coverage.csv", "e5/label_distance.csv", "e5/ratios.csv", "e5/reading.json", "e5/summary.md",
"e6/band_rmse_by_budget.csv", "e6/h2a_by_budget.csv", "e6/reading.json", "e6/reproduction.csv", "e6/runs.csv",
"e6/summary.md",
),
"gp_review_e2_summary": tuple(f"e2/{name}" for name in (
"h2a_with_b3p.csv", "ratios.csv", "reading.json", "summary.md", "warp_rmse.csv",
)),
"gp_review_e1_summary": tuple(f"e1/summary/{name}" for name in (
"means.csv", "p4_posterior.csv", "posterior_cells.csv", "ratios.csv", "summary.md", "verdict.json", "warp_rmse.csv",
)),
"gp_review_field_table": ("tables/field_wells.tex",),
"gp_review_misspec_table": ("tables/misspec.tex",),
}
SITECUSTOMIZE = '''
import os, sys
_log = os.environ.get("REPRO_AUDIT_LOG")
@@ -465,9 +509,11 @@ def audit_summary(opens: Path, repo: Path, work: Path) -> dict:
def verify(a) -> None:
if unknown := set(a.only or ()) - {name for name, _, _ in STEPS}:
raise SystemExit(f"unknown verify stages: {', '.join(sorted(unknown))}")
man = json.loads(MANIFEST.read_text(encoding="utf-8"))
out = Path(a.out)
work = Path(a.work) if a.work else out / "work"
out = Path(a.out).resolve()
work = Path(a.work).resolve() if a.work else out / "work"
if work.exists():
shutil.rmtree(work)
repo, logs, audit, tmp = work / "repo", work / "logs", work / "audit", work / "raster"
@@ -508,13 +554,17 @@ def verify(a) -> None:
"code_files": len(files), "package_files": len(man["files"]), "steps": []}
steps = [s for s in STEPS if not a.only or s[0] in a.only]
for name, argv, kind in steps:
expected = {f"outputs/gp_review/{p}" for p in GP_EXPECTED.get(name, ())}
before = set(p.relative_to(repo).as_posix() for p in (repo / "outputs").rglob("*") if p.is_file())
t_step = time.time()
r = run_step(name, argv, repo, logs, audit)
au = audit_summary(logs / f"{name}.opens", repo, work)
cmp_ = []
for rel in au["written"]:
for rel in sorted(set(au["written"]) | expected):
f = repo / rel
if rel in expected and (rel not in au["written"] or not f.is_file() or rel not in by_path):
cmp_.append({"path": rel, "status": "missing", "detail": "not regenerated from the archive"})
continue
if rel.startswith("outputs/") and f.is_file():
if rel in by_path:
cmp_.append({"path": rel, **compare_file(f, REPO_ROOT / rel, repo)})
@@ -553,6 +603,10 @@ def verify(a) -> None:
report["finished_utc"] = datetime.now(timezone.utc).isoformat(timespec="seconds")
(work / "verify.json").write_text(json.dumps(report, indent=1))
write_report(report, work, DOC / "verify_report.md" if not a.only else work / "verify_report.md")
failed = [s["name"] for s in report["steps"] if s["rc"] or s["original_repo_reads"] or s["read_outside_package"]
or any(c["status"] in ("differs", "missing") for c in s["compared"])]
if failed:
raise SystemExit(f"verification failed in {', '.join(failed)} (details in {work / 'verify.json'})")
if not a.keep and not a.only:
shutil.rmtree(work)