# Dispatch Unification Audit (CP-5 Phase 1)

Generated: 2026-04-28T04:37:56Z
Predecessor: post-cp4-modality-registry
Rollback: pre-cp5-entry-point-unification

## Callsite inventory (frozen for CP-5 migration)

```
execute_keyframe direct callers: 16
execute_video direct callers: 28
```

Full machine-readable list: `consultations/recoil/cp5-entry-point-spec/cp5_phase1_callsites.json`

## api_client.py proxy importer inventory

```
Active proxy imports: 15
```

## CP-5 Migration plan summary

- Phase 5 (orchestrators batch A): production_loop.py, pipeline.py, lib/run_shot.py
- Phase 6 (tools + UI/API batch B): tools/produce, tools/shootout, pipeline/tools/*, review_server, api/routes/generation
- Phase 7 (api_client proxy migrate): 17 import lines, 8 files
- Phase 8 (delete + rename): pipeline/lib/api_client.py removed; test_via_steprunner.py → dispatch_cli.py + shim
- Phase 9 (register_default_runners relocate): canonical → pipeline/core/dispatch.py; old path re-export deprecated

## Frozen contracts (do not touch)
- recoil/execution/step_runner.py byte-stable
- recoil/execution/step_types.py byte-stable
- recoil/pipeline/core/registry.py byte-stable
- recoil/pipeline/lib/prompt_engine.py byte-stable
- recoil/execution/providers/* byte-stable

## Tag verification

```
Parent post-cp4: 540af63e4ad28bb2cd88ca175c0298504ebfe58a
Parent pre-cp5:  5c2ec6eae330ee60b06e3005f750ec1058760169
EM     post-cp4: 0f3893b24fdf75beb25212f2065792bddff118e6
EM     pre-cp5:  0f3893b24fdf75beb25212f2065792bddff118e6
```

---

## Post-CP-5 summary (2026-04-28)

CP-5 build complete. All 10 phases passed.

### Migration outcome
- **27 production callsites** routed through `dispatch()`.
- **15 import lines** swapped from `lib.api_client` → `execution.api_client`.
- **`pipeline/lib/api_client.py` deleted.**
- **`test_via_steprunner.py` → `dispatch_cli.py`** with 19-line back-compat shim.
- **`register_default_runners` canonical home: `pipeline.core.dispatch`.**

### Verification gates (all GREEN)
- Full pytest: 1070 passed, 11 skipped
- Cold dispatch matrix: 4 modalities + unknown-modality KeyError + 4 JSONL receipts
- Sidecar prompt hash gate: VACUOUS (0 baseline samples on disk)
- Engine-memory diff: empty
- step_runner.py byte-stability: 0 diff lines vs pre-cp5
- Deprecation re-export resolution: pipeline.core resolves to canonical; old paths warn
- Direct execute_* call inventory: 0 actual call sites (6 docstring/comment hits only)

### Tags
- `post-cp5-entry-point-unification` (parent + engine-memory)
- Rollback: `pre-cp5-entry-point-unification`

### Hand-off to CP-6
See `consultations/recoil/cp5-entry-point-spec/CP6_HANDOFF.md`.
