untracked files on main: dceb101 feat(#63): IMP-34 R1 donor capacity measured bound (u1+u2)

This commit is contained in:
kmlee1 committed 2026-05-21 22:07:41 +09:00
commit 8f085a28d3
3220 files changed
+985495

No files matched your search

+1
View File
@@ -0,0 +1 @@
{"body": "[Claude #15] Stage 3 code-edit — IMP-33 #61 (R11 u11)\n\nExecuting unit: u11\n\n■ unit_executed\n- id: u11\n- summary: Docs sync — narrow scope per Stage 2 plan (\"the binding runtime state, module path, Step 12/17 state, cascade order, and IMP-46 gate\"). Updates [`docs/architecture/IMP-17-CARVE-OUT.md`](docs/architecture/IMP-17-CARVE-OUT.md) and [`docs/architecture/IMP-31-GATE-AUDIT.md`](docs/architecture/IMP-31-GATE-AUDIT.md) so the design-only language is replaced with binding references to the IMP-33 u1~u10 runtime module surface. Adds [`tests/phase_z2_ai_fallback/test_docs_sync.py`](tests/phase_z2_ai_fallback/test_docs_sync.py) as a structural pin so future drift between code and docs fails the test suite (not silently rotted prose).\n\n■ files_changed\n- docs/architecture/IMP-17-CARVE-OUT.md (EDIT, +13 / -2)\n- docs/architecture/IMP-31-GATE-AUDIT.md (EDIT, +5 / -5)\n- tests/phase_z2_ai_fallback/test_docs_sync.py (NEW, 61 lines, 11 parametrised cases + 1 standalone test)\n\n■ diff_summary\n- `docs/architecture/IMP-17-CARVE-OUT.md`:\n - Status line: \"carve-out, **design-only**\" → \"carve-out infra **scaffolded under IMP-33** (issue #61, Stage 3 u1~u11)\". Adds explicit PZ-1 note: `ai_fallback_enabled` flag default `False` in `src/config.py` (u1), Step 12 entry provisional-gated (u8), Step 17 entry structurally blocked behind IMP-34 + IMP-35 (u9).\n - NEW §\"Runtime module surface (IMP-33 u1~u11 binding)\" table — single source of truth for downstream consumers. Six rows:\n 1. **Module path** — `src/phase_z2_ai_fallback/`, cross-linked to [`IMP-31-GATE-AUDIT.md`](docs/architecture/IMP-31-GATE-AUDIT.md):31,50,56 (Stage 1 binding lock).\n 2. **Step 12 entry** — `src.phase_z2_ai_fallback.step12.gather_step12_ai_repair_proposals`; records the three structural gates (`not_provisional` skip, `design_reference_only_no_ai` skip, non-AI route catch-all) that run BEFORE `route_ai_fallback`. Mirrors the u8 contract exactly.\n 3. **Step 17 entry** — `src.phase_z2_ai_fallback.step17.gather_step17_ai_repair_proposals`; explicit STRUCTURALLY BLOCKED label with the `step17_ai_blocked_imp_34_35_prerequisites_missing` sentinel + the import-graph guarantee (does NOT import `route_ai_fallback` / `AiFallbackClient` / `anthropic`).\n 4. **Cascade order** — `OVERFLOW_CASCADE_ORDER = (DETERMINISTIC, POPUP, AI_REPAIR, USER_OVERRIDE)`. Cross-references line 16 of this same doc (the carve-out \"deterministic → popup → AI → user override\" prose) so the doc text and the code constant stay aligned.\n 5. **IMP-46 cache gate** — `save_proposal(..., visual_check_passed, user_approved)` raises `AiFallbackCacheGateError` unless BOTH gates are True; storage backend then raises `NotImplementedError` (the IMP-46 marker). `read_proposal` returns `None` until IMP-46 lands a backend.\n 6. **AST isolation** — `tests/phase_z2_ai_fallback/test_ast_isolation.py` whitelist (`src.config` + intra-package + stdlib + `anthropic` + `pydantic`) + Phase Q / Kei / `src.phase_z2_*` (non-fallback) blacklist. This is the structural invariant that protects PZ-1 at the import boundary, not at the runtime branch.\n\n- `docs/architecture/IMP-31-GATE-AUDIT.md`:\n - Verdict line (§3 below the 3-condition table): \"Runtime AI adaptation remains design-only. `src/phase_z2_ai_fallback/` = declaration-only path (not created this cycle)\" → \"Runtime AI adaptation remains gated. `src/phase_z2_ai_fallback/` = **scaffolded under IMP-33** (#61, Stage 3 u1~u11); module created, but `settings.ai_fallback_enabled` defaults to `False` (u1) so normal-path AI call count remains 0 (PZ-1). Runtime engagement still requires the 3-condition AND gate above.\" Gate verdict itself (NOT CLEAR) is unchanged — only the module-existence sub-clause is corrected.\n - §\"Out of scope (this cycle)\": removed the now-stale `src/phase_z2_ai_fallback/` directory-creation exclusion (the directory exists), kept everything else (runtime AI consumer enablement, candidate_evidence schema change, Phase Q file mutation, Kei API reuse, IMP-29 frontend override, IMP-30 invariant change, calculate_fit migration), and added a cross-link to [`IMP-17-CARVE-OUT.md`](docs/architecture/IMP-17-CARVE-OUT.md) §\"Runtime module surface\" so the audit reader can find the binding surface in one hop.\n - §\"Future activation path\": dropped \"declaration only\" qualifier (path now exists), updated the module-path bullet to \"scaffolded under IMP-33; flag default OFF until gate clears\" so the 3-condition activation contract reads correctly post-u1~u10.\n\n- `tests/phase_z2_ai_fallback/test_docs_sync.py` (NEW):\n - Stage 2 lists \"u11=docs sync verification\" as the test deliverable. This file IS that verification.\n - 1 parametrised function (`test_carve_out_doc_references_runtime_surface`) over 10 needles covering every axis Stage 2 listed for u11:\n - `src/phase_z2_ai_fallback/` (module path)\n - `gather_Line truncated