Skip to content

Blueprint Truth Cutover: Wave 1-3b + 验收收口 - #20

Merged
Li-Sanze merged 11 commits into
mainfrom
feat/blueprint-truth-cutover
May 3, 2026
Merged

Blueprint Truth Cutover: Wave 1-3b + 验收收口#20
Li-Sanze merged 11 commits into
mainfrom
feat/blueprint-truth-cutover

Conversation

@Li-Sanze

@Li-Sanze Li-Sanze commented May 3, 2026

Copy link
Copy Markdown
Collaborator

变更范围

Wave 1(低耦合 host action 合并)

  • continue_host_quick_fixcontinue_host_develop
  • host_replay_bridge_requiredcontinue_host_workflow
  • archive_completedarchive_review

Wave 2a-2e(结构性收敛)

  • 2a: continue_host_workflowcontinue_host_develop(mode=standard)
  • 2b: archive_review 退出 host action,变成 terminal receipt surface
  • 2c: develop_checkpointdevelop_callback(hard cutover)
  • 2d: 18 runtime routes → 6 canonical families
  • 2e: consult proof via ActionProposal

Wave 3a(plan_proposal hard cut)

  • 删除 confirm_plan_package / current_plan_proposal / plan_proposal_pending

Wave 3b(execution_confirm hard cut)

  • 删除 confirm_execute / execution_confirm / execution_confirm_pending
  • gate ready → continue_host_develop

Task 7(验收收口)

  • 8 条验收标准全 PASS,方案包归档至 history/2026-05

验收

# 标准 状态
1 Runtime 表面符合预算 ✅ checkpoint=2, route=6, host action=5+1 legacy
2 最小新链路可跑
3 旧复杂面可观察下降 ✅ -3596 lines
4 Blueprint 是唯一 forward baseline
5 旧面冻结
6 Prompt-layer 同步
7 Smoke/bundle 合同同步
8 测试层同步 ✅ 580 passed

Cross-review: concerns (0 blocker)


GitHub Release — v2026-05-03.203432

Blueprint Truth Cutover — 完成

让 blueprint 成为产品预算和契约的唯一定义源。Runtime 从 truth source 降为迁移层 + 参考实现。

核心变更

Runtime 表面收敛到 canonical 预算:

  • Checkpoint kinds: 5 → 2(clarification, decision)
  • Route families: 18 → 6(consult, plan, develop, archive, summary, cancel)
  • Host actions: 11 → 5 canonical + 1 legacy

删除三个大型 legacy 概念层:

  • plan_proposal 层(confirm_plan_package / plan_proposal_pending)— Wave 3a
  • execution_confirm 层(confirm_execute / execution_confirm_pending)— Wave 3b
  • archive_review 从 host action 退出 — Wave 2b

净删 3596 行代码,93 文件变更。

Breaking Changes

  • execution_confirm.py 已删除
  • plan_proposal.py 已删除
  • develop_checkpoint 重命名为 develop_callback(无兼容 alias)
  • Host action confirm_execute / confirm_plan_package / archive_review 不再出现
  • V1 scope 收缩到 confirm_decision only

验证

  • 580 tests passed, 46 subtests passed
  • 8 条验收标准全 PASS
  • Cross-review advisory: 0 blocker
  • Release preflight: all checks passed

已知 Legacy Debt

  • review_or_execute_plan: host action 超 canonical 预算
  • continue_checkpoint_confirmation: 孤儿映射

Li-Sanze added 11 commits May 2, 2026 13:44
archive_lifecycle route now uses continue_host_consult as transport
label. Host-facing results expressed via archive_lifecycle artifact +
archive_receipt_status (completed | review_required) +
current_archive_receipt.json sidecar.

Deleted:
- archive_review from deterministic_guard tables + _evaluate_archive_review_guard
- archive_review from action_projection tables + _build_archive_review_fields
- archive_review from output label dicts
- archive handoffs skip v1 guard/projection assembly entirely

Added:
- archive_receipt_status canonical two-value mapping in handoff assembly
- archive_receipt_status passthrough in gate _normalize_handoff
- Freeze constraint: 5 retired actions blocked from guard/projection re-entry
- Freeze assertions: archive handoffs carry no deterministic_guard/action_projection
- design.md red line: no inheriting old control semantics on label reuse

662 tests pass. Net -146 lines.

Context-Checkpoint: C

Release-Sync: yes

Release-Version: 2026-05-02.134449

Release-Date: 2026-05-02
…missing files + 3 mapping entries

Corrections from pre-implementation audit:
- Add runtime_test_support.py (ImportError if missed), .githooks/pre-commit
  (release sync trigger), .sopify-skills/project.md (runtime guidance doc)
- Add mapping entries: requires_develop_checkpoint(), host_bridge_status key,
  entry_guard JSON key
- manifest.py: 5 contract keys + 1 constant (was understated as 3 keys)
- File count: 24 → 26
Complete atomic rename across 24 active files. Helper capability
preserved; checkpoint/route concept fully exited from all machine
contract surfaces.

Runtime (6 files):
- develop_checkpoint.py → develop_callback.py (module rename + all
  internal symbols)
- develop_quality.py: required_helper key + trigger constants +
  requires_develop_callback()
- engine.py: import path + 2 function call renames (mechanical only)
- entry_guard.py: DEVELOP_CALLBACK_ENTRY + reason code value
- manifest.py: 5 contract keys + 1 constant (host_bridge_status,
  capability, limits, entry_guard section)
- state_invariants.py: policy id

Installer (4): file paths + capability key
Scripts (3): file rename + smoke/sync references
Prompt layer (4): CLAUDE.md ×2, AGENTS.md ×2
Tests (4): test_runtime_engine, test_installer, test_runtime_decision,
  runtime_test_support
Infra: .githooks/pre-commit script path regex
Docs: blueprint/design.md active baseline, project.md

Not changed (by design): checkpoint_kind, checkpoint_request.py,
DEVELOP_RESUME_*, route names, phase=develop, CHANGELOG, ADR-017,
history archives.

662 tests passed, 68 subtests passed.

Context-Checkpoint: C

Release-Sync: yes

Release-Version: 2026-05-02.150730

Release-Date: 2026-05-02
Route family convergence:
- workflow/light_iterate → plan
- quick_fix → develop
- replay → consult
- archive_lifecycle → archive

Non-family surfaces declared: state_conflict, cancel_active, summary

Runtime changes:
- handoff.py: _ROUTE_HANDOFF_KIND 5-mapping convergence + replay required_host_action → continue_host_consult
- engine.py: add _CANONICAL_ROUTE_FAMILIES + _NON_FAMILY_SURFACES constants
- output.py: converge next hints to canonical families, replay label merged into consult, dead labels removed
- builtin_catalog + skill.yaml: workflow-learning handoff_kind → consult

Blueprint + plan docs updated to reflect decided dispositions.

Context-Checkpoint: B

Release-Sync: yes

Release-Version: 2026-05-02.205827

Release-Date: 2026-05-02
…oposal

test_consult_route_produces_canonical_contract in test_runtime_gate.py:
- Modern host path: action_proposal_json={consult_readonly}
- status=ready, gate_passed=true
- route_name=consult
- handoff_kind=consult, required_host_action=continue_host_consult
- evidence confirms handoff persisted, receipt on disk

Also fix plan docs: route_family=consult → handoff_kind=consult (no such
field exists in runtime; handoff_kind is the actual canonical surface).

Context-Checkpoint: B
Delete the entire plan_proposal checkpoint surface:
- plan_proposal_pending route
- confirm_plan_package host action
- current_plan_proposal.json state file
- runtime/plan_proposal.py module (555 lines)

Planning requests now directly materialize formal plan packages.
Router plan_package_policy always returns 'immediate'.
Engine _normalized_plan_package_policy converts 'confirm' -> 'immediate'.

Blueprint design.md, ADR-017, and tasks.md updated to reflect
completed state. _models/proposal.py and context_snapshot field
kept for deserialization compat.

45 files changed, -3408 lines net deletion.
592 tests pass, 0 failures.

Context-Checkpoint: A

Release-Sync: yes

Release-Version: 2026-05-02.234429

Release-Date: 2026-05-02
…rompts, docs, scripts, installer

Remove all references to execution_confirm, confirm_execute, and
execution_confirm_pending from Wave 3b scoped files:

Contracts (7 files):
- decision_tables.yaml: remove confirm_execute from ignored_required_host_actions,
  signal_priority enabled_checkpoint_kinds, failure_recovery rows,
  side_effect_mapping row, prompt_mode_fallbacks
- failure_recovery_table.yaml: remove 4 confirm_execute row blocks (16→12 rows)
- 5 schema files: remove from enum arrays

Prompt-layer (4 files):
- EN/CN AGENTS.md and CLAUDE.md: remove confirm_execute flow notes and
  execution_confirm_pending from pending lists

Docs (2 files):
- how-sopify-works.md/.en.md: remove mermaid confirm_execute nodes and
  checkpoint rule bullet

Scripts (2 files):
- check-prompt-runtime-gate-smoke.py: remove execution_confirm scenario,
  dead helper functions, unused imports
- check-fail-close-contract.py: change fallback from reask_confirm_execute
  to reask_confirm_decision

Installer (1 file):
- inspection.py: remove execution_confirm_review_checkpoint_conflict entry

Test cascade (5 files):
- context_fail_close_contract.yaml: mirror decision_tables cleanup
- fail_close_case_matrix.yaml: remove A-4 and A-6 case blocks
- sample_invariant_gate_matrix.yaml: remove A-4 and A-6 entries
- test_runtime_failure_recovery.py: update assertions for reduced counts
- test_runtime_sample_invariant_gate.py: remove A-4/A-6 tests and assertions
…firm_pending

Runtime (20 files):
- Delete execution_confirm.py; migrate build_execution_summary to handoff.py
- engine.py: remove ~220 lines of execution_confirm dispatch/handling
- router.py: remove execution_confirm route patterns and parsing
- checkpoint_request.py: remove from CHECKPOINT_KINDS, fail-close unknown
- checkpoint_materializer.py: fail-close on unknown kind, no confirm_execute fallback
- handoff.py: remove confirm_execute from action routing/mappings
- execution_gate.py: ready_for_execution -> continue_host_develop
- context_snapshot.py: remove execution_confirm conflict/mapping surfaces
- context_v1_scope.py: contract V1 scope to confirm_decision only
- action_projection.py, output.py, deterministic_guard.py,
  plan_orchestrator.py, entry_guard.py, gate.py, manifest.py,
  vnext_phase_boundary.py, action_intent.py: remove all refs

Blueprint docs (2 files):
- skill-standards-refactor.md: pending 三态 -> 二态
- design.md: remove execution_confirm_pending from transitional list

Plan (2 files):
- tasks.md: mark Wave 3b done
- design.md: sync Wave 3b section

Tests (11 files):
- Adapt test files and fixture YAMLs for execution_confirm removal
- 580 passed, 46 subtests passed

Context-Checkpoint: C

Release-Sync: yes

Release-Version: 2026-05-03.201958

Release-Date: 2026-05-03
Fix confirm_plan_package / current_plan_proposal / plan_proposal_pending
residuals in prompt-layer (Wave 3a miss, caught during Task 7 verification):
- Codex/Skills/EN/AGENTS.md: remove 5 confirm_plan_package refs
- Codex/Skills/CN/AGENTS.md: remove 5 confirm_plan_package refs
- Claude files synced by pre-commit hook

Verification results (8 acceptance criteria):
1. Runtime surface fits budget: PASS (checkpoint=2, route=6, host action=5+1 legacy)
2. Minimal new path works: PASS (consult avoids plan_proposal/execution_confirm)
3. Observable reduction: PASS (multi-wave cumulative -1500+ lines)
4. Blueprint is sole forward baseline: PASS
5. Legacy surface frozen: PASS
6. Prompt-layer sync: PASS (after this fix)
7. Smoke/bundle contract sync: PASS
8. Test layer sync: PASS (580 passed, 46 subtests)

Known legacy debt (non-blocking):
- review_or_execute_plan: host action exceeds canonical budget of 5
- continue_checkpoint_confirmation: pre-existing orphan mapping in decision_tables.yaml

Context-Checkpoint: C

Release-Sync: yes

Release-Version: 2026-05-03.203432

Release-Date: 2026-05-03
All 7 tasks complete, 8 acceptance criteria verified.
Plan was manually managed (not runtime-managed), so archive via git mv.

Context-Checkpoint: C
@Li-Sanze
Li-Sanze merged commit 9063631 into main May 3, 2026
2 of 4 checks passed
@Li-Sanze
Li-Sanze deleted the feat/blueprint-truth-cutover branch May 3, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant