1
WIKI_CUTOVER_RUNBOOK
stan44 edited this page 2026-02-23 20:19:14 -06:00

Hybrid-to-C# Cutover Runbook (Phase 6)

This runbook defines the staged cutover from Python baseline to C# non-AI backend, while keeping AI/speech execution in Python.

Architecture Lock

  • C# is system-of-record for non-AI backend paths.
  • AI inference and speech execution remain Python runtime.
  • C# uses bridge/orchestration contracts (ai.*, speech.*) only.

Stage 0: Gate Green (Required Before Any Soak/Pilot)

Run:

./scripts/migration-gate.ps1

Must pass:

  • C# builds (Sidecar + API)
  • C# smoke tests
  • Python vs C# parity harness
  • API contract tests

Artifacts:

  • logs/parity_harness_results.json
  • fixtures/vaults/manifest.json

Stage 1: Internal Soak (8h+)

Run hybrid mode and exercise:

  • login + vault load/unload
  • create/edit/save/reload large entries
  • search filters (date/section/tag/type/checkbox)
  • speech actions (healthy + failure path)
  • app idle periods + repeated tab switching

Acceptance:

  • no stuck login loops
  • no sidebar/session degradation
  • no vault corruption
  • no plaintext leftovers after shutdown/cleanup

Stage 2: Small User Pilot

Enable 1-3 pilot users with representative workflows.

Collect:

  • reproducible bug reports (steps + timestamps)
  • gate command output after fixes
  • any parity mismatches from harness

Stage 3: Default Cutover

Keep backend default as:

  • JOURNAL_BACKEND_MODE=csharp-hybrid

Promote once Stage 0-2 remain stable over consecutive runs.

Rollback Path (Immediate)

Set environment variable and restart:

$env:JOURNAL_BACKEND_MODE = "python"
python .\journal\run_desktop.py

Rollback must remain validated in smoke and manual startup checks.

Operational Policy During Cutover

  • UI freeze except bug fixes that block usability or stability.
  • No feature expansion until gate regressions are clear.
  • Every merge affecting backend contract must include updated evidence in MIGRATION_ACCEPTANCE_CRITERIA.md.