fix(#10): B4 V4-evidence placement_trace 를 P4b 복구 경로에서 보존 + SHA baseline 재캡처

문제: 현재 모든 unit 이 mapper FitError → Emergency P4b verbatim/inline-AI 복구
경로로 흐르는데, 이 경로의 debug_zones 기록이 이미 계산된 placement_trace 를
누락 → PHASE_Z_B4_V4_EVIDENCE=1 에서 v4_evidence_consumed 가 전 zone 관측 불가
(u10 aggregate 테스트 red — 'flag ON이 OFF처럼 동작' silent regression 상태).

수정:
- P4b verbatim(L9107) / inline-AI(L9170) debug_zones 에 placement_trace 추가
  (debug 전용 — zones_data/final.html 영향 X. adapter_needed 경로는 기존부터 보유)
- imp95_pre_baseline_sha.json 재캡처 (capture_imp95_pre_baseline.py 정규 절차 —
  스냅샷 이후 상류 drift 로 구 baseline 무효화. 89a baseline 과 동일 패턴)

검증:
- trace fields 7/7 + SHA parity 포함 regression 14/14 passed
- tests/phase_z2 전체 709 passed / 11 failed — 실패 11건은 stash 검증으로
  본 변경과 무관한 기존 실패 확인 (layout cols/fixtures/imp88 salvage/step17 axis)

참고 (이슈 #10 전제 정정): call-site v4_candidates 배선(L8888)과 Step 11
trace hoist(L8913)는 이미 구현돼 있었음 — 실제 갭은 복구 경로의 trace 유실.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-03 09:41:04 +09:00
co-authored by Claude Opus 4.8
parent bd29130c90
commit d75c063337
2 changed files with 19 additions and 9 deletions
+10
View File
@@ -9124,6 +9124,13 @@ def run_phase_z2_mvp1(
"coverage_state": _expansion_trace["coverage_state"],
"frame_expansion_trace": _expansion_trace,
"assets_dir": str(_assets_dir.relative_to(run_dir)) if _assets_dir else None,
# issue #10 — IMP-95 B4 trace 를 P4b verbatim 복구 경로에서도
# 보존. placement_trace 는 같은 iteration 의 L8913 에서 이미
# 계산됨 (plan_placement 는 mapper FitError 이전에 실행) —
# 이 debug 기록 누락 때문에 flag ON 에서 v4_evidence_consumed
# 가 전 zone 에서 관측 불가였음 (u10 aggregate 실패 원인).
# debug_zones 전용 — zones_data / final.html 영향 X.
"placement_trace": placement_trace,
})
continue # skip adapter_needed path — code 가 채움
@@ -9179,6 +9186,9 @@ def run_phase_z2_mvp1(
"ai_redistribute": True,
"ai_redistribute_actual_template": _actual_template_id,
"assets_dir": str(_assets_dir.relative_to(run_dir)) if _assets_dir else None,
# issue #10 — verbatim 경로와 동일: B4 placement_trace 보존
# (debug_zones 전용, render 영향 X).
"placement_trace": placement_trace,
})
continue # skip adapter_needed path — AI 가 채움
@@ -2,7 +2,7 @@
"schema_version": 1,
"axis": "IMP-95 u8 — final.html SHA baseline captured via FULL run_phase_z2_mvp1 pipeline under PHASE_Z_B4_V4_EVIDENCE=OFF and PHASE_Z_B4_MAPPER_SOURCE=OFF (defaults)",
"description": "Frozen SHA-256 of `final.html` bytes (production write site src/phase_z2_pipeline.py:5994-5996) for mdx 01/02/04/05 under PHASE_Z_B4_V4_EVIDENCE OFF. Under flag OFF, IMP-95 (u1~u7) is strictly no-op for final.html (planner branch falls through to legacy _select_frame at u3; u4/u5/u6 additive telemetry confined to placement_trace per the trace-only docstring at src/phase_z2_pipeline.py:86). The u8 regression test asserts SHA equality with these frozen values, so any future code change that drifts the flag-OFF render output produces a mismatch and breaks the test. mdx 03 is excluded per Stage 2 u8 scope (mdx 03 정비 LOCK). Regenerate only when an upstream delta is reviewed and accepted as the new pre-IMP-95 reference.",
"captured_at_utc": "2026-05-27T08:23:24Z",
"captured_at_utc": "2026-07-03T00:02:27Z",
"renderer": {
"entrypoint": "src.phase_z2_pipeline.run_phase_z2_mvp1",
"write_site": "src/phase_z2_pipeline.py:5994-5996",
@@ -18,29 +18,29 @@
"01.mdx": {
"mdx_file": "01.mdx",
"run_id": "imp95_baseline_01",
"final_html_size_bytes": 29959,
"sha256": "62d793166ca4cdd8d8d1d134d8659b43dce95bb958e7efd6ce0e72619b3c335d",
"final_html_size_bytes": 38731,
"sha256": "749ebb626e284a62d37b5be32af97c61ae2a5b8d4226d1c3fa90f04c843d9fef",
"pipeline_exit_code": null
},
"02.mdx": {
"mdx_file": "02.mdx",
"run_id": "imp95_baseline_02",
"final_html_size_bytes": 38135,
"sha256": "d6df786e322bac9b337cd06a62a8a817fd34f5a17dcacc45452a94808fcbf0ed",
"final_html_size_bytes": 42127,
"sha256": "835d67eb7003bbcc55f3ea9ea73e6c781bb3b51d021a860200876c1d93cecfd2",
"pipeline_exit_code": null
},
"04.mdx": {
"mdx_file": "04.mdx",
"run_id": "imp95_baseline_04",
"final_html_size_bytes": 52646,
"sha256": "9f93bedc4ef11ce21fb2c22d8dd7798cfdd7e73f550ba1141a6b5f6fa974fd8f",
"final_html_size_bytes": 40206,
"sha256": "8ba35bc6642b0e651cd46b9216070bd49052b016807611d9771fd630ca7a2613",
"pipeline_exit_code": 1
},
"05.mdx": {
"mdx_file": "05.mdx",
"run_id": "imp95_baseline_05",
"final_html_size_bytes": 31751,
"sha256": "f212df273f7761c60631c54be3847a57f9226ed50bfe8b702e166e7a0413babb",
"final_html_size_bytes": 36844,
"sha256": "397f238df2d23c7f3371d9032de5fbae4fd37aca116bb8b62e8fd36c4255c26d",
"pipeline_exit_code": null
}
},