This commit is contained in:
commit
8f085a28d3
3220 files changed
+985495
No files matched your search
@@ -0,0 +1 @@
|
||||
{"body": "[Claude #1] Stage 1 problem-review \u2014 IMP-30 first-render invariant + abort bypass\n\n=== ROOT_CAUSE ===\n\nTwo abort paths described in the issue are real. Issue line numbers are stale; verified actual locations:\n\n| issue ref | actual location | what it does |\n|---|---|---|\n| path (a) `if not units or layout_preset is None` @ `:1762~` | `src/phase_z2_pipeline.py:3156` | writes `error.json`, then `sys.exit(1)` |\n| path (b) `if status not in MVP1_ALLOWED_STATUSES` @ `:489` | `src/phase_z2_pipeline.py:657` (inside `_choose_match_from_judgments`) | per-rank candidate filter; cascades to `selection_path=\"chain_exhausted\"` \u2192 `lookup_v4_match()` returns `None` \u2192 composition planner emits no candidate for that section |\n\n**Cascade:** When every aligned section produces only `restructure`/`reject` V4 labels (or has no V4 entry at all), path (b) filters all rank-1/2/3 candidates inside `_choose_match_from_judgments`, the section ends up with no `CompositionUnit` in `collect_candidates`, `plan_composition` returns `units=[]` + `preset=None`, and path (a) hard-aborts before any artifact tree (`final.html`, `step20_slide_status.json`, candidate_evidence, \u2026) is written.\n\n**Downstream blast radius:** IMP-29 (#38, shipped `b4872ba`) frontend zone-level evidence bridge has nothing to read because `data/runs/<run-id>/` never gets populated. IMP-31 (AI adaptation) cannot be triggered because it expects a first-render trace as input. The pipeline survivability invariant (\"first render always produced, even when degraded\") is violated.\n\n=== SCOPE_LOCK ===\n\n**IN scope (IMP-30):**\n\n1. **Composition layer placeholder synthesis** \u2014 `src/phase_z2_composition.py`:\n - For each aligned section uncovered by any auto-selectable `CompositionUnit` (no V4 match, all restructure/reject, or `chain_exhausted`), synthesize a **placeholder `CompositionUnit`** with:\n - `frame_template_id = \"__placeholder_needs_adaptation__\"` (sentinel \u2014 parallel to existing `__empty__` pattern at `:3536`)\n - `phase_z_status = \"placeholder_needs_adaptation\"` (informational only; **NOT** added to `MVP1_ALLOWED_STATUSES`)\n - `placeholder = True`, `adaptation_reason \u2208 {no_v4_entry, restructure_only, reject_only, chain_exhausted}`\n - `raw_content = section.raw_content` (MDX byte-preserved, no rewrite)\n - `v4_candidates` populated from full-32 (including reject) so IMP-31 has seed evidence\n - placeholders DO NOT pass through `select_composition_units` filter (which gates on `auto_selectable + allowed_statuses`); they are union-appended at `plan_composition` exit to cover sections the auto pass missed.\n\n2. **Abort path (a) loosen** \u2014 `src/phase_z2_pipeline.py:3156`:\n - Trigger `sys.exit(1)` only when `len(sections) == 0` (truly empty MDX input).\n - When `len(sections) > 0` but auto units are 0, placeholders cover the gap; `layout_preset` is computed from `len(auto_units \u222a placeholder_units)`.\n\n3. **Renderer placeholder partial** \u2014 minimal partial under `templates/phase_z2/placeholders/needs_adaptation.html`:\n - emits a visible adaptation banner (\"needs user/AI adaptation\") + section title + MDX preview (truncated, full text in `<details>` if long).\n - zone-loop `:2059` short-circuit gains a sibling branch: `template_id == \"__placeholder_needs_adaptation__\"` \u2192 render the placeholder partial instead of the empty string.\n\n4. **Telemetry / artifacts**:\n - Step 6 `composition_plan` artifact: new `placeholder_units` list (one entry per placeholder, with `section_id`, `adaptation_reason`, `v4_candidates_count`).\n - Step 20 `slide_status`: new informational fields `placeholder_zone_count` + `placeholder_section_ids` + `adaptation_pending_count`. **Top-level `overall` enum unchanged** (PASS / RENDERED_WITH_VISUAL_REGRESSION / PARTIAL_COVERAGE / \u2026).\n - `candidate_evidence` per-zone (IMP-05 L2 schema) for placeholder zones records `placeholder=True` + `adaptation_reason` + full V4 evidence (including reject candidates).\n\n5. **`full_mdx_coverage` semantics** \u2014 placeholder-covered sections count as `covered` (placeholder still provides zone identity + MDX preservation on the slide). `adaptation_pending_count` separately surfaces how many of those covered zones need adaptation. Rationale: matches issue intent \"abort \ud68c\ud53c + provisional first result\" \u2014 every section reaches the slide visibly, deferred work is tracked separately.\n\n**OUT of scope:**\n\n- AI-assisted adaptation for restructure/reject zones \u2192 **IMP-31**\n- Frontend interactive override on placeholder zones \u2192 **IMP-29** (bridge already shipped `b4872ba`)\n- Post-render `frame_reselect` execution \u2192 IMP-29 \ub610\ub294 \ubcc4 axis\n- Composition planner promoting rank-2/3 with `restructure`/`reject` labels \u2192 would require changing `MVP1_ALLOWED_STATUSES` baseline = \ubcc4 axis\n\n=== GUARDRAILS ===\n\n| guardrail | how satisfied Line truncated
|
||||
Reference in new issue
Block a user