--- id: RMGR-WP-0003 type: workplan title: "Production pilot dual-run: config, bulk path, push-seal" domain: infotech repo: repo-manager status: finished owner: codex topic_slug: repo-manager created: "2026-08-11" updated: "2026-08-11" parent_project: prj-state-hub-retirement parent_workplan: SHR-WP-0001 stream: S1 related: - RMGR-WP-0002 - STATE-WP-0079 - specs/ArchitectureBlueprint.md state_hub_workstream_id: "f914d79d-8e6f-4cb1-9c5f-fad4eac253c0" --- # Production pilot dual-run: config, bulk path, push-seal ## Goal Make Stage B dual-run **operable in production for a pilot set** without relying only on ad-hoc API process env vars, and close remaining high-frequency mutation gaps (bulk status, post-writeback push) so STATE-WP-0079 can expand cutover. **Not in scope:** full C-rule port, Postgres registry, MCP rewrite, Stage C host_paths SoR, dashboards. ## Dual-run config file (shared RM + SH) ```task id: RMGR-WP-0003-T01 status: done priority: high state_hub_task_id: "e843f4b1-5ed9-4e38-adc0-8ea711359c1a" ``` Load dual-run settings from `~/.repo-manager/dual-run.yaml` (and optional `RM_DUAL_RUN_CONFIG` path), with env vars still overriding. Fields: writeback, reconcile, pilot_repos, writeback_push, meter_path. Document and unit-test. **Result:** Config loader in RM + SH dual_run modules; env overrides file. ## Bulk task-status dual-run on State Hub ```task id: RMGR-WP-0003-T02 status: done priority: high state_hub_task_id: "8bc99a17-8332-4e56-9e78-a63cd3bbc416" ``` When dual-run writeback is on for the task's repo, `POST /tasks/bulk-status-sync` delegates each status change to RM (same as PATCH). Preserve progress events on SH. Failures log and fall back to native DB-only (file via later C-15). **Result:** bulk_status_sync hooks try_writeback_for_task per status change. ## Push-seal after RM writeback ```task id: RMGR-WP-0003-T03 status: done priority: high state_hub_task_id: "fa01c87e-06d7-4048-821d-97e4fc0baafe" ``` When `writeback_push: true` (or `RM_WRITEBACK_PUSH=1`), RM writeback path pushes after commit (best-effort, never force). SH facade passes push=true for pilot. Meter push_ok/fail. Align with C-16/C-17 semantics (skip push issues as meter only; do not force). **Result:** writeback_push config/env; SH facade sets push=writeback_push_enabled(). ## Pilot defaults + operator runbook ```task id: RMGR-WP-0003-T04 status: done priority: medium state_hub_task_id: "0dbf65fd-d996-4f49-9951-f9b7df7053ea" ``` Ship example config for pilot `repo-manager`, update `docs/dual-run.md`, capture `docs/evidence/wp0003-*.md` with meter summary command for STATE-WP-0079. **Result:** `config/dual-run.pilot.example.yaml`, dual-run.md, evidence note. ## Acceptance - [x] Config file drives dual-run (env override still works) - [x] Bulk status uses RM writeback when flagged - [x] Optional push after writeback - [x] Evidence + runbook for pilot expansion