Files
C.E.L_Slide_test2/.orchestrator/tmp/imp13_u7_payload.json
T

1 line
3.8 KiB
JSON

{"body": "Executing unit: u7 (refresh)\n\n[Claude #12] Stage 3 \u2014 u7 manifest-schema assertions added (rewind fix from Codex #11 rejection)\n\n**unit_executed**: u7 \u2014 pytest smoke for `scripts/generate_frame_previews.py`\n\n**files_changed**:\n- `tests/test_generate_frame_previews.py` (overwrite; still single-file scope)\n\n**diff_summary**:\n- Added `import json` for manifest JSON parsing.\n- Extended `_fixture()` to also create an `ORPHAN/` dir with only `preview.png` (no `index.html`), giving non-empty `missing_index_html` + `orphan` buckets without requiring Selenium.\n- Updated `test_discover_counts` for the new 3-entry fixture (`[\"FRAME_A\", \"FRAME_B\", \"ORPHAN\"]`, has_index sum = 1, has_preview sum = 2).\n- Merged former `test_no_ai_or_pipeline_imports` + `test_no_hardcoded_slide_dimensions` into one `test_source_invariants` to stay within the Stage 2 \u226450-line guardrail (file final = **50 lines exactly**).\n- Updated `test_dry_run_prints_counts` expected line to match the new fixture: `discovered: total=3 with_index_html=1 with_preview_png=2`.\n- **NEW** `test_manifest_schema(tmp_path)` \u2014 the explicit miss called out in [Codex #11]:\n - Builds an orphan-only fixture (one dir with `preview.png`, no `index.html`) so `renderable=[]` and `main()` never invokes `_build_driver()` / Selenium.\n - Calls `gfp.main([\"--blocks-dir\", ..., \"--manifest\", ...])` (no `--dry-run`) \u2192 forces the manifest writer path in `scripts/generate_frame_previews.py:183`.\n - Asserts top-level schema keys \u2287 `{\"schema\", \"generated_at\", \"blocks_dir\", \"summary\", \"frames\"}` and `data[\"schema\"] == 1`.\n - Asserts `summary` subkeys \u2287 `{\"total\", \"renderable\", \"missing_index_html\", \"orphan\", \"rendered\", \"skipped_unchanged\", \"error\"}`, `summary[\"orphan\"] == 1`, and `frames[\"F\"][\"status\"] == \"orphan\"`.\n\n**evidence**:\n- `wc -l tests/test_generate_frame_previews.py` \u2192 **50** (Stage 2 u7 guardrail: \u226450 lines, \u22643 files; 1 file changed).\n- `python -m pytest tests/test_generate_frame_previews.py -q` \u2192 **5 passed in 0.05s** (was 4 before this refresh; +1 = `test_manifest_schema`).\n- `git status --short scripts/ tests/test_generate_frame_previews.py` \u2192 only IMP-13's own files (`scripts/generate_frame_previews.py`, `tests/test_generate_frame_previews.py`); no edits to `src/slide_measurer.py`, `src/phase_z2_pipeline.py`, `Front/vite.config.ts`, `templates/phase_z2/frames`, or any tracked file.\n- `_build_driver()` is **not** called in any test path (orphan-only fixture in `test_manifest_schema` guarantees `buckets[\"renderable\"] == []`; pytest run shows 0 chromedriver/Selenium errors).\n- Source-invariant tokens still absent from script: `anthropic | openai | jinja | phase_z2 | slide_measurer`; literal-px guard still rejects `1280 | 720 | 1400 | 900`.\n\n**remaining_units**: [] (u1, u2, u3, u4, u5, u6, u7 all complete per Stage 2 plan).\n\n**follow_up_issue_candidates**:\n- *(soft-link, IMP-04 territory)* HTML generation for the 13 `missing_index_html` frames \u2014 out of IMP-13 scope per Stage 1 lock; manifest will keep emitting them as `status: missing_index_html` until IMP-04 lands.\n- *(observed during u7 work, no action required)* Stage 2 noted `data/figma_previews/index.json` does not parse as JSON; orthogonal axis, not in IMP-13 boundary.\n\n**scope_lock recheck**:\n- Build-time only \u2713 (no `phase_z2_pipeline`/`slide_measurer` imports).\n- Idempotent \u2713 (`is_unchanged` covered by `test_idempotency_unchanged`).\n- Failure-loud \u2713 (`test_manifest_schema` proves orphan/missing rows reach the manifest, not silently dropped).\n- No spacing-shrink, no hardcoding \u2713 (`test_source_invariants` enforces).\n\n**Next**: STOP per Stage 3 rule. Next turn = Stage 4 (test-verify) by Codex; expecting `FINAL_CONSENSUS: YES` since all 7 units now satisfy the binding contract.\n"}