feat(#71): IMP-42 u1~u5 silent fail chain diagnostics (assert + invalid-char detector + DIAG log)
Some checks failed
Multi-MDX Regression (IMP-91) / multi-mdx-regression (push) Failing after 24s
Some checks failed
Multi-MDX Regression (IMP-91) / multi-mdx-regression (push) Failing after 24s
Stage 4 binding scope — diagnostic-only, fail-loud, sample-agnostic (RULE 0 / AI-isolation contract). No production behavior change beyond fail-loud raises on previously-silent failure classes. u1 src/phase_z2_pipeline.py:2747-2772 — render_slide precondition assert (template_id non-empty str + slot_payload dict), placed after the `__empty__` short-circuit at 2740 to preserve empty-zone grid behavior. u2 src/phase_z2_pipeline.py:2681-2710 — _scan_rendered_html_for_invalid_path_chars helper covering src / href / url(...) values for backslash, &, '. Invoked on partial render (2778) and slide_base assembly (2798). u3 src/phase_z2_pipeline.py:2638-2676,2733,5509 — _emit_diag_zones_shape shape-only [DIAG] JSON at Step 12 slot_payload emit and Step 13 render_slide entry. No env gate — silence is the bug. u4 Front/client/src/pages/Home.tsx:388-392 — unconditional [DIAG raw overrides] console.log on handleGenerate boundary, after flushUserOverrides() and immediately before runPipeline. u5 tests/phase_z2/test_phase_z2_diag_smoke_general.py — 32-frame general smoke driven by load_frame_contracts() registry (not literal MDX 03/04/05), parametrizes u1/u2/u3 across the full frame_contracts.yaml top-level. Tests (Stage 4 verification PASS): - u1 8 passed, u2 14 passed, u3 12 passed, u4 5 passed, u5 97 passed. - Backend full regression tests/phase_z2/ 499 passed in 110.84s. - Frontend full regression 182 passed in 1.10s. Out of scope (separate axes): - Path normalization / as_posix migration. - Autoescape policy change. - build_layout_css refactor (Stage 1 category-error rejection). - Recovery / auto-fix on detected invalid path. - MDX content / frame-selection / zone-composition change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -384,6 +384,14 @@ export default function Home() {
|
||||
// clicks Generate would race the PUT against /api/run; the u2
|
||||
// fallback could then load a stale persisted document.
|
||||
await flushUserOverrides();
|
||||
// IMP-42 u4 — unconditional DIAG console.log on the handleGenerate
|
||||
// entry-to-backend boundary. Surfaces the override payload + uploaded
|
||||
// file name so the user can see exactly what crossed the wire when
|
||||
// the pipeline fails silently. No env gate (silence is the bug).
|
||||
console.log("[DIAG raw overrides]", {
|
||||
file: state.uploadedFile.name,
|
||||
overrides,
|
||||
});
|
||||
const result = await runPipeline(state.uploadedFile, overrides);
|
||||
|
||||
if (!result.success || !result.final_html_exists) {
|
||||
|
||||
Reference in New Issue
Block a user