feat(RMGR-WP-0002): dual-run writeback, flags, meter, SH facade
Add dual-run flags/meter, harden task-status (idempotency, UUID, head, push), State Hub adapter for PATCH /tasks and C-15/reconcile proxy, pilot evidence, and finish RMGR-WP-0002.
This commit is contained in:
parent
bb1d030257
commit
310b43079d
14 changed files with 679 additions and 50 deletions
50
docs/dual-run.md
Normal file
50
docs/dual-run.md
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# Dual-run flags (RMGR-WP-0002)
|
||||
|
||||
State Hub remains the MCP/REST entrypoint. When flags are on, **checkout
|
||||
mutation** is executed by Repo Manager.
|
||||
|
||||
## Environment variables
|
||||
|
||||
| Variable | Meaning |
|
||||
| --- | --- |
|
||||
| `RM_WRITEBACK=1` | Task file writeback via `rmgr update-task-status` |
|
||||
| `RM_RECONCILE=1` | `fix-consistency` also runs `rmgr reconcile` for pilots |
|
||||
| `RM_PILOT_REPOS=repo-manager` | Comma-separated slugs; **unset** = all repos when flags on |
|
||||
| `RM_METER_PATH` | JSONL meter path (default `~/.repo-manager/mutation-meter.jsonl`) |
|
||||
| `REPO_MANAGER_SRC` | Optional path to `repo-manager/src` for SH adapter |
|
||||
| `RMGR_BIN` | Optional override command prefix for `rmgr` |
|
||||
|
||||
## Rollback
|
||||
|
||||
```bash
|
||||
unset RM_WRITEBACK RM_RECONCILE RM_PILOT_REPOS
|
||||
# or
|
||||
export RM_WRITEBACK=0 RM_RECONCILE=0
|
||||
```
|
||||
|
||||
State Hub immediately uses native C-15 writeback again.
|
||||
|
||||
## Pilot (repo-manager)
|
||||
|
||||
```bash
|
||||
export RM_WRITEBACK=1
|
||||
export RM_RECONCILE=1
|
||||
export RM_PILOT_REPOS=repo-manager
|
||||
export REPO_MANAGER_SRC=$HOME/repo-manager/src
|
||||
|
||||
# From API host environment, PATCH a task or:
|
||||
cd ~/repo-manager
|
||||
rmgr update-task-status --path . --task-id <canonical-or-uuid> --status progress
|
||||
|
||||
cd ~/repo-manager && statehub fix-consistency
|
||||
rmgr dual-run-status
|
||||
```
|
||||
|
||||
## Meter
|
||||
|
||||
```bash
|
||||
rmgr dual-run-status
|
||||
# or
|
||||
wc -l ~/.repo-manager/mutation-meter.jsonl
|
||||
grep repo-manager ~/.repo-manager/mutation-meter.jsonl | tail
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue