0%

Retire legacy workflow/control paths

Goal

Retire every parallel workflow/context/queue/closeout path after durability, shadow parity, self-hosting, and new-root cutover pass. Keep one engine, invocation protocol, selector, ContextAssembler, queue selector, and root closeout coordinator.

Self-hosting constraint

  • Remove the old path ONLY after the engine has driven this plan’s post-cutover work and every ported scenario is green.
  • Delete the legacy-escape branch LAST. The surviving old-path gate is WORKFLOW_ENGINE_LEGACY=1 (scripts/workflow_engine/drive_hook.py), NEVER a WORKFLOW_ENGINE_DRIVE opt-in.
  • Retiring that branch removes the last non-engine serve/completion route; git revert is the durable reversal until then.

Implementation sketch

  • Re-run root durability, invocation, return-fold, Reminder lifecycle, selector, virtual-batch, and client parity acceptance suites.
  • Retire copied prompt strings, path-only canonical rule ownership, per-runtime selectors, legacy attach_* guidance, and client-side route inference.
  • Retire every model/client-authored workflow prompt, goal/loop operation other than the exact continue-runtime read and unchanged current/next delivery, goal/loop state inference, transcript-completion heuristic, and client-authored keep/stop branch. Keep only script-rendered prompt catalogs, plan/tracker domain state, root execution mechanics, ContinueRuntimeView delivery, and engine-issued TerminalReceipt observation.
  • Require a machine-readable migration manifest mapping every harvested workflow/decision/resume/loop/control surface to its engine workflow/component and removed legacy owner.
  • Reconcile that manifest against every live skill and command in spec/migration-targets.md; require its classified shape, public-entrypoint cutover, applicable scenario/client/context/replay/fault/performance gates, sealed migration receipt, and old-owner removal. A wrapper contract alone is not migration.
  • Retire independent child closeout/review/version/commit/status branches and skip/deferred ownership aliases; only root obligations remain.
  • Retire live/compose-only /fix-next-bug selector duplicates and historical cluster-promotion execution paths; preserve explicit domain ownership declarations and advisory graph relatedness.
  • Generate Claude compatibility projections from workflow_control/; require Claude Code + OpenCode semantic parity before retiring Claude ownership.
  • Retire the old path: remove the old completion/serve code + the WORKFLOW_ENGINE_LEGACY escape branch ONLY after full-scenario-green + the self-hosting completion; full ./test-all.sh green.
  • Retire the old changelog home (enforces the engine-core s-e585be74 “no third changelog home” SRP split): migrate the existing improve-tooling/*-design.md §6 Improvement Log entries for each migrated component into that component’s ComponentMetadata.changelog (append-only), THEN delete the §6 Improvement Log section from the migrated design-logs — design-log §4 Lessons (deep rationale) stays. Gated by sc-6106109e.

Spec references

  • plans/workflow-engine-rework/spec/workflow-state-machines.md sec 11 (researched hardening: 11.1 concepts, 11.2 net-new, 11.3 guard rails); sec 10 (strangler migration — never big-bang).

Test strategy / acceptance

Retirement pins:

  • ONE engine/store/selector/assembler/batch/closeout/adapter pump/reminder scheduler.
  • NO child closeouts, client-authored stops/timers/prompts, client or transcript domain state, arbitrary yields, prose-driven routing, or copied guidance.
  • Exhaustive skill/command inventory closure.
  • Full scenario/property/fault/client/context suite + spec-sec-11.4 bounded liveness and performance comparators + ./test-all.sh green.
  • Every validated regression or required comparator miss is Critical.
  • Acceptance depends on fixed workloads and fault windows, NEVER elapsed-time waiting.

Work Items

  • Re-run 3-channel error, root/frame idempotency, and cross-session durability gates before deletion
  • Re-run invocation reconcile-resume and root engine-bundle inheritance gates before deletion
  • Re-run sec-11.3 root/invocation/batch guard-rail suite before deletion
  • Verify Reminder lifecycle persistence at invocation/subtree/root scope and zero credit for violated mandatory reminders
  • Retire duplicate, hand-authored, and model/client-authored prompt/directive strings plus legacy attach paths after reminder migration; enforce script-producer/source-reference pins, catalog coverage, exact rendered digests, and no parallel assembly path
  • Prove contextual selectors eliminate harvested path-based miss and over-hit scenarios while preserving required rule coverage and bounded context
  • Retire Claude-only canonical rule ownership after generated projections and the concrete Claude Code, Codex, and OpenCode adapters pass the same context-assembly, script-prompt provenance, and transport-observer scenarios
  • Verify root/frame/subtree tombstones, active ownership, and stale-return rejection before legacy removal
  • Verify every root/frame mismatch, rejected override, clarification halt, child push/pop, and root pivot is traced before legacy removal
  • Verify the migration manifest reconciles in both directions with every live skill/command inventory row and has exactly one classified target shape, public engine owner, applicable scenario/client/context/replay/fault/performance evidence, sealed receipt, and legacy-removal receipt; reject missing, duplicate, dead, wrapper-only, or unbounded owners
  • Retire client-prompted reminder refresh, client-authored stop/next-action state, goal/loop operations beyond ContinueRuntimeAPI.read plus unchanged current/next delivery, goal/loop-as-workflow-state, transcript completion heuristics, and prose-driven blocker detours after proactive guidance, script-owned transport directives, matching TerminalReceipt observation, timer scheduler, and typed routing prove authoritative
  • Terminally dispose every folded tooling-cli bug before retirement: close absorbed (SUBSUMED-BY-stamped) bugs whose cure shipped via the tracker flip API with a resolution citing the owning section, re-verify obe closes, and prove zero folded bugs lack a terminal disposition (verify_bug_fold_manifest green over the final tracker state)
  • Retire the old scattered path after full-scenario-green + self-hosting completion (test-all green) AND retire the old changelog home: migrate each migrated component’s improve-tooling/*-design.md §6 Improvement Log entries into its ComponentMetadata.changelog, then delete the §6 Improvement Log section (design-log §4 Lessons stays). Gated by sc-6106109e.

Intel dossier — pointer and tier disposition

Dossier: hardening-retire--s-6738975c.intel.md (this section’s content/intel/ sidecar)

Read that dossier from line 1 through EOF before acting on this section. This block is a pointer and an audit record, never a substitute: not the BLUF, not a summary, not selected tiers.

Dossier tierTitleLinesDispositionWhere / why
00. Bottom line up front36pending
11. The target, verbatim30pending
22. Terrain — the deletion + proof surface66pending
33. Code-graph recon162pending
3D3D. Diagnostic / observability surface — the engine’s own verifier suite34pending
3H3H. Hygiene constraints the downstream work inherits30pending
44. Cluster / family — what must land first, and what is still open52pending
55. Conformance audit — one-owner proof, and where it currently stands25pending
66. Plan ownership24pending
77. Prior art — legacy-path removal in mature compilers42pending
88. Sentiment — community heat around legacy-path retirement13pending
99. Declared coverage gaps — what this dossier could NOT see34pending
1010. Recommended recon entry points27pending