repo-manager/workplans/RMGR-WP-0002-retirement-dual-run-strangler.md
tegwick 754d02f40e docs: research SH repo tooling, architecture blueprint, RMGR-WP-0002
Document how State Hub registers, resolves, reconciles, and mutates
repos; blueprint Stage B dual-run toward retirement; open workplan for
SH adapter writeback/reconcile without non-retirement refactors.
2026-08-09 23:04:49 +02:00

4.1 KiB
Raw Blame History

id type title domain repo status owner topic_slug created updated parent_project parent_workplan stream related
RMGR-WP-0002 workplan Retirement dual-run: SH adapter for writeback and reconcile infotech repo-manager proposed codex repo-manager 2026-08-09 2026-08-09 prj-state-hub-retirement SHR-WP-0001 S1
RMGR-WP-0001
STATE-WP-0079
ACTIVITY-WP-0029
specs/ArchitectureBlueprint.md
history/2026-08-09-state-hub-repo-tooling-research.md

Retirement dual-run: SH adapter for writeback and reconcile

Goal

Close in on State Hub retirement of repository checkout mutation by making Repo Manager the executor for the highest-value write path and for reconcile, behind a State Hub dual-run facade—not by refactoring RM for cleanliness.

Success is measured by: agent task-status updates and fix-consistency can run with Git evidence produced by Repo Manager, while State Hub remains the MCP/REST entrypoint until meters allow cutover (Blueprint Stage B → toward D).

Out of scope for this workplan: dashboard UX, SBOM product work, full MCP rewrite, topic-spine cleanup, generic framework polish, expanding command catalog beyond what dual-run requires.

Blueprint alignment

See specs/ArchitectureBlueprint.md §4§9. This WP is Stage B.

Define dual-run feature flags and success meters

id: RMGR-WP-0002-T01
status: todo
priority: high

Specify flags (e.g. RM_WRITEBACK=1, RM_RECONCILE=1) and a minimal meter: count of checkout mutations by source state-hub vs repo-manager. Document rollback (flag off → SH native path). No new product metrics frameworks.

Productionize task-status command for dual-run

id: RMGR-WP-0002-T02
status: todo
priority: high

Harden repo.work.update_task_status from the T05 slice for dual-run use: idempotency key, expected_head_sha optional, push-seal compatible behavior (or explicit handoff to existing SH push-seal once), failure codes matching CMD-0001. Keep CLI; add thin HTTP only if SH adapter requires it.

State Hub facade: route update_task_status to RM when flagged

id: RMGR-WP-0002-T03
status: todo
priority: high

In state-hub (child change under this coordination): when flag on, MCP/REST task status updates call RM command for file+git evidence, then refresh SH index as needed. When flag off, preserve current behavior. Compatibility test: same file result as native SH writeback on golden fixtures.

Coordinate IDs with STATE-WP-0079; do not expand SH scope beyond the adapter.

Dual-run reconcile: SH fix-consistency delegates to RM when flagged

id: RMGR-WP-0002-T04
status: todo
priority: high

Port or wrap the minimum C-rules needed so statehub fix-consistency --fix (or a feature-flagged path) can execute reconcile via RM for a pilot repo set. Inbox C-rules stay on SH/hub-core. Goal: SH process stops implementing new reconcile logic; it proxies.

Pilot cutover on one non-critical repo

id: RMGR-WP-0002-T05
status: todo
priority: high

Enable flags for one agreed pilot repo (e.g. repo-manager itself or a low-risk tooling repo). Run agent task status + fix-consistency for ≥1 session. Capture evidence: before/after git SHAs, meter counts, no data loss. Document operator rollback.

Hand evidence to STATE-WP-0079 / project gates

id: RMGR-WP-0002-T06
status: todo
priority: medium

Write cutover evidence under docs/evidence/ and link from STATE-WP-0079 / G-RMGR notes so the retirement program can expand the flag fleet-wide. No extra architecture rewrite—just retirement evidence.

Acceptance

  • Feature flags + mutation meter defined and usable
  • Task-status dual-run path works with RM git_sha evidence
  • fix-consistency can delegate reconcile for pilot set
  • One pilot repo runs dual-run without regression
  • Evidence package enables STATE-WP-0079 expansion
  • No scope creep into non-retirement refactors

Residuals (only if needed at finish)

Anything not required for Stage B becomes a later WP or residual intake with origin: residual — not silent backlog in SCOPE.md.