RFC-0006: Legacy Retirement Matrix and Cutover Gates¶
Status: Draft Date: 2026-05-26 Depends on: RFC-0001 through RFC-0005
1. Purpose¶
Define a bounded migration policy so ORCA reaches a clean final architecture without indefinite dual-path maintenance.
2. Migration Policy¶
- Legacy support is temporary and explicitly bounded.
- Canonical behavior is implemented only in the new core.
- Legacy layers are compatibility projections, not feature surfaces.
- Each migration stage has measurable cutover gates.
3. Retirement Matrix¶
3.1 Execution¶
- Legacy component: sync-first execution ownership.
- Canonical replacement: async-first execution ownership.
- Temporary bridge: sync adapter over async core.
- Retirement gate:
- All core lifecycle operations pass via async core.
- No runtime feature branch targets legacy execution internals.
3.2 Run model¶
- Legacy component: minimal run model (running/completed/failed).
- Canonical replacement: RunStore v2 lifecycle model.
- Temporary bridge: legacy response projection from RunStore v2.
- Retirement gate:
- APIs and SDKs read canonical statuses.
- Legacy status projection no longer required by supported clients.
3.3 Human-in-the-loop¶
- Legacy component: exception-only confirmation flow.
- Canonical replacement: persisted waiting_for_human lifecycle state.
- Temporary bridge: exception mapping to persisted approval state.
- Retirement gate:
- approve/deny lifecycle is used in all HITL scenarios.
- Exception-only flow removed from runtime control path.
3.4 Events¶
- Legacy component: log-centric unversioned runtime events.
- Canonical replacement: versioned EventStore contract.
- Temporary bridge: log projection from canonical events.
- Retirement gate:
- Streaming and trace APIs read from EventStore.
- Operators use canonical event schema for automation.
3.5 Side effects¶
- Legacy component: step metadata without durable effect ledger.
- Canonical replacement: SideEffectLedger with idempotency and replay policy.
- Temporary bridge: step metadata references to effect records.
- Retirement gate:
- External actions are recorded in ledger by default.
- Replay policy enforcement no longer bypassable.
4. Cutover Gates (Global)¶
Cutover to clean architecture is approved only when all gates pass:
- Functional gates:
- resume, replay, fork, approve, deny all pass end-to-end tests.
-
side-effect replay safety tests pass for use_recorded_result and require_human flows.
-
Observability gates:
- canonical events emitted for full run lifecycle.
-
trace/checkpoint/event APIs return consistent run views.
-
Compatibility gates:
- supported clients can operate through canonical APIs or projection adapters.
-
migration notices and deprecation warnings are in place.
-
Operational gates:
- no regressions in baseline reliability suite.
- incident rollback plan validated for first cutover release.
5. Deprecation and Removal Policy¶
- Stage A: announce deprecation and publish migration guide.
- Stage B: keep compatibility layer read-only (no new features).
- Stage C: remove legacy code paths and documentation references.
6. Documentation and Communication Requirements¶
- Update docs/ASYNC_EXECUTION.md to canonical durable semantics.
- Update docs/RUNNER_GUIDE.md and docs/OBSERVABILITY.md to canonical state/event model.
- Publish migration notes in API changelog and release notes.
7. Final State Definition¶
ORCA final architecture is considered clean when:
- Runtime has a single canonical execution core.
- Durable lifecycle is first-class across all surfaces.
- Side-effect safety is mandatory for external actions.
- Legacy projections are fully removed.