P4b Runtime Surface Consolidation: prove-kept-or-delete 结论 + 路线图更新 + 归档#31
Merged
Merged
Conversation
主要修订: - 新增 Phase 0(test inventory re-audit + hard/soft gate matrix) - Phase 1 扩展为真实 CI/preflight 降载,不只改 preflight 文案 - gate.py action_proposal_retry 主路径移出删除候选(keep-list frozen) - Phase 2 方法论改为 prove-kept-or-delete(keep-list 外默认整段删除) - 消除 CI hard contract 自循环锚点,改为 keep-list/主链/distribution 投影 - 混合文件分类承载机制:@pytest.mark.implementation_mirror + -m 选择器 - 合并兜底改为非 LOC 驱动,优先继续发现语义死面 - distribution 补全到所有 hard gate 定义 - 预算合计同步调整(2,355-3,590 LOC)
Phase 0 re-audit: 校准测试分类边界,为 P4b Phase 2 删旧面建立干净基线。 文件级重标: - test_runtime_config.py: contract → implementation-mirror - fail_close_contract_entry.py: 补 implementation-mirror 标记 用例级标记(@pytest.mark.implementation_mirror): - test_runtime_engine.py: 11 cases (bridge/compat/legacy archive/router classify) - test_runtime_gate.py: 10 cases (preflight fallback/legacy helper/CLI text) - test_runtime_failure_recovery.py: 5 cases (legacy recovery/v1 schema) - test_runtime_message_templates.py: 4 cases (template fallback/rendering) - test_runtime_router.py: 1 case (repo-local wording) 新增 tests/conftest.py 注册 implementation_mirror marker。 Hard gate (-m 'not implementation_mirror'): 653 tests Soft gate (-m 'implementation_mirror'): 31 tests 全量: 684 passed Context-Checkpoint: A Context-Checkpoint: B Context-Checkpoint: C
Phase 1 CI/preflight 真实降载: ci.yml: - hard gate (blocking): pytest -m 'not implementation_mirror' (653 tests) - soft gate (advisory, continue-on-error): pytest -m 'implementation_mirror' (31 tests) - 从 unittest discover 切换到 pytest(pip install pytest) release-preflight.sh: - hard gate (blocking): 同上 - soft gate (advisory, non-blocking): 失败仅 WARNING 不阻断发布 tasks.md: Phase 0 (0.1-0.4) + Phase 1 (1.1-1.4) 全部勾完 验证结果: - hard gate: 653 passed, 31 deselected - soft gate: 31 passed, 653 deselected Context-Checkpoint: A Context-Checkpoint: B Context-Checkpoint: C Release-Sync: yes Release-Version: 2026-05-09.152019 Release-Date: 2026-05-09
…clusion Phase 2 prove-kept-or-delete full scan result: - Scanned all runtime/*.py (24,354 LOC, 20+ files) - Tier 1 targets (bridge/preflight/orchestrator): 0 LOC deletable - vendored fallback = production path for bundle deployment - bridge files bound to distribution anchor (manifest/installer/smoke) - LEGACY_FALLBACK_SELECTED branch covered by 5 hard gate test files - Tier 2 targets: 9 LOC dead code (router.py _contains_intent + _runtime_skill) - Tier 3 engine.py: 6 LOC dead code (_phase_for_route) - Total dead code: 15 LOC, deleted and hard gate verified (653 passed) Conclusion: runtime is near minimal viable size under current contract constraints. <20K LOC target not achievable without changing distribution/ installer contracts. P4b plan marked completed. Final baseline: 24,334 LOC (from 25,534 at plan start, delta includes prior measurement variance + 15 LOC dead code removal). Context-Checkpoint: B Context-Checkpoint: C Release-Sync: yes Release-Version: 2026-05-09.175537 Release-Date: 2026-05-09
- 优先级表:P4b 标已完成,新增 P4b.5 行,P4c 前置从 P4a 改为 P4b.5 - P4b section:标已完成,待归档,加归档说明 - P4b.5 section:新增(待开),定义宿主接入层级矩阵产出 - P4c section:排序改为 P4b.5 就绪后执行 - P4d/P5/P6:新增长期路线 - intake checklist:里程碑列表同步含 P6 Context-Checkpoint: blueprint
- plan/ → history/2026-05/20260509_p4b_runtime_surface_consolidation/ - tasks.md: archive_ready → true - history/index.md: 新增 P4b 条目 - blueprint/tasks.md: P4b 引用改为归档路径 Context-Checkpoint: blueprint, plan
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
P4b Runtime Surface Consolidation 全生命周期交付。
交付内容
Phase 0: Test Re-audit
Phase 1: CI/Preflight 真实降载
ci.ymlhard/soft gate 分离release-preflight.sh分层执行Phase 2: Prove-kept-or-delete 全量扫描
_phase_for_route(engine.py)、_contains_intent+_runtime_skill(router.py)路线图更新
归档
plan/移至history/2026-05/archive_ready: trueHard Gate
653 passed, 31 deselected ✅