factory design: engage side — answer-asks + rearm_dispatch (#615 follow-up) #617

Closed
opened 2026-08-20 05:10:29 +00:00 by matou-build-agent · 1 comment

Context

#615 ("factory design: engage side — answer-ask/label writes/rearm_dispatch", #614 follow-up) scoped all three remaining engage write actions #614 named: answer parked asks, arm/park/prioritise (label writes), and re-arm (rearm_dispatch). #615's own "Suggested next slice" recommended picking ONE for that session rather than all three at once, and named label writes as the cheapest (no Mattermost thread-protocol replay, just a /labels POST/DELETE pair). #615 closed on that delivered, proven slice — the Queue tab's arm/park/prioritise actions (.sandcastle/tui/, data/labels.py) — per #607/#611/#613/#614's own precedent (a ready-for-session ticket left open across sessions scores "no progress" under this repo's session-runner rules) rather than sit open indefinitely. This ticket carries the two write actions that didn't fit in that slice.

Scope

Both remaining two-way doors under ADR 0174 (agent-shaped once picked up, per #573's own ruling, carried forward unchanged by #611/#613/#614/#615):

  • Answer parked asks by speaking the ask-thread protocol (ask-human.sh/post-issue-ask.sh/resume-parked-asks.sh) — the Inbox tab (#614) already surfaces which issues are outstanding vs answered-pending-sweep vs idle; this ticket is the write action that acts on that read.
  • Re-arm = rearm_dispatch (.sandcastle/claim-lib.sh — a workflow_dispatch POST against swarm.yml, distinct from a label write).

Explicitly NOT this ticket: cancelling a live run (#612) and arm/park/prioritise label writes (#615) — already shipped.

Suggested next slice

Same shape as #573/#607/#611/#612/#613/#614/#615's own slice-by-slice history: each of these two write actions wants its own confirm-before-fire UX design (the Cancel action's two-keypress arm/confirm, #612, is the nearest precedent) rather than being bolted onto the Inbox tab's read. Recommend picking ONE for the next session rather than both at once. rearm_dispatch is likely the cheaper of the two — a single POST /actions/workflows/swarm.yml/dispatches call (forgejo_dispatch_workflow in forgejo-lib.sh already has the exact shape) with no state to track beyond firing the request, versus answering parked asks needing to replay ask-human.sh's consumed-vs-outstanding thread logic (data/ask_inbox.py, #614) on the write side too.

Ruled by agent under ADR 0174 (scope split, revertible/provable, no one-way-door): filing ready-for-session to match #573/#607/#611/#612/#613/#614/#615's own label — this is factory/dev tooling requiring the session's host standing, not Ben.

## Context #615 ("factory design: engage side — answer-ask/label writes/rearm_dispatch", #614 follow-up) scoped all three remaining engage write actions #614 named: answer parked asks, arm/park/prioritise (label writes), and re-arm (`rearm_dispatch`). #615's own "Suggested next slice" recommended picking ONE for that session rather than all three at once, and named label writes as the cheapest (no Mattermost thread-protocol replay, just a `/labels` POST/DELETE pair). #615 closed on that delivered, proven slice — the Queue tab's arm/park/prioritise actions (`.sandcastle/tui/`, `data/labels.py`) — per #607/#611/#613/#614's own precedent (a `ready-for-session` ticket left open across sessions scores "no progress" under this repo's session-runner rules) rather than sit open indefinitely. This ticket carries the two write actions that didn't fit in that slice. ## Scope Both remaining two-way doors under ADR 0174 (agent-shaped once picked up, per #573's own ruling, carried forward unchanged by #611/#613/#614/#615): - **Answer parked asks** by speaking the ask-thread protocol (`ask-human.sh`/`post-issue-ask.sh`/`resume-parked-asks.sh`) — the Inbox tab (#614) already surfaces which issues are `outstanding` vs `answered-pending-sweep` vs `idle`; this ticket is the write action that acts on that read. - **Re-arm** = `rearm_dispatch` (`.sandcastle/claim-lib.sh` — a `workflow_dispatch` POST against `swarm.yml`, distinct from a label write). **Explicitly NOT this ticket:** cancelling a live run (#612) and arm/park/prioritise label writes (#615) — already shipped. ## Suggested next slice Same shape as #573/#607/#611/#612/#613/#614/#615's own slice-by-slice history: each of these two write actions wants its own confirm-before-fire UX design (the Cancel action's two-keypress arm/confirm, #612, is the nearest precedent) rather than being bolted onto the Inbox tab's read. Recommend picking ONE for the next session rather than both at once. `rearm_dispatch` is likely the cheaper of the two — a single `POST /actions/workflows/swarm.yml/dispatches` call (`forgejo_dispatch_workflow` in `forgejo-lib.sh` already has the exact shape) with no state to track beyond firing the request, versus answering parked asks needing to replay `ask-human.sh`'s consumed-vs-outstanding thread logic (`data/ask_inbox.py`, #614) on the write side too. Ruled by agent under ADR 0174 (scope split, revertible/provable, no one-way-door): filing `ready-for-session` to match #573/#607/#611/#612/#613/#614/#615's own label — this is factory/dev tooling requiring the session's host standing, not Ben.
Author
Member

Ruled by agent under ADR 0174 — veto anytime.

Ruling: per this ticket's own "Suggested next slice", picked ONE of the
two remaining engage write actions for this session — rearm_dispatch,
the cheaper of the two (a single workflow_dispatch POST, no
Mattermost thread-protocol replay). Two-way door: revertible with a commit,
provable by the offline suite plus the already-live-tested bash equivalent
it mirrors. Not on the ADR 0174 one-way-door list.

Close report:

  • New .sandcastle/tui/data/rearm.py — dispatch() POSTs
    {"ref":"main"} to /actions/workflows/swarm.yml/dispatches, the
    exact shape .sandcastle/claim-lib.sh's own rearm_dispatch and
    forgejo-lib.sh's forgejo_dispatch_workflow already use in
    production (run-swarm.sh's own re-dispatch-when-work-remains call).
  • app.py's Queue tab gains an r binding: two-keypress arm/confirm
    (REARM_CONFIRM_WINDOW, 5s — same shape as Cancel's
    CANCEL_CONFIRM_WINDOW and the label ops' LABELOP_CONFIRM_WINDOW),
    scoped to the Queue tab, with no row selection involved (the armed state
    is a bare timestamp, not an (action, issue) pair, since the dispatch
    isn't scoped to any one issue).
  • 9 new offline tests (3 tests/test_rearm.py, 6 tests/test_app.py) —
    full TUI suite 129/129 green.
  • Deliberately not live-smoke-verified against a real dispatch: unlike
    #615's disposable scratch-issue label writes, a real
    workflow_dispatch POST against swarm.yml has no disposable
    equivalent — it would kick an actual swarm run (real compute, real
    ticket claims), making the "proof" indistinguishable from the write
    action's real-world side effect. The protocol is instead proven live
    daily by the bash equivalent it mirrors (run-swarm.sh via
    claim-lib.sh's rearm_dispatch, plus forgejo-lib-test.sh's and
    self-rearm-test.sh's existing fake-curl coverage of that same call);
    the new offline suite pins the Python side of the identical shape.
  • STATUS.md and .sandcastle/tui/README.md updated in the same
    commit (cc304a5, pushed to main).
  • Answering parked asks (the one remaining engage write action) split into
    follow-up #618, filed ready-for-session, per the same
    #607/#611/#613/#614/#615 precedent — advances #618.
Ruled by agent under ADR 0174 — veto anytime. **Ruling:** per this ticket's own "Suggested next slice", picked ONE of the two remaining engage write actions for this session — `rearm_dispatch`, the cheaper of the two (a single `workflow_dispatch` POST, no Mattermost thread-protocol replay). Two-way door: revertible with a commit, provable by the offline suite plus the already-live-tested bash equivalent it mirrors. Not on the ADR 0174 one-way-door list. **Close report:** - New `.sandcastle/tui/data/rearm.py` — `dispatch()` POSTs `{"ref":"main"}` to `/actions/workflows/swarm.yml/dispatches`, the exact shape `.sandcastle/claim-lib.sh`'s own `rearm_dispatch` and `forgejo-lib.sh`'s `forgejo_dispatch_workflow` already use in production (`run-swarm.sh`'s own re-dispatch-when-work-remains call). - `app.py`'s Queue tab gains an `r` binding: two-keypress arm/confirm (`REARM_CONFIRM_WINDOW`, 5s — same shape as Cancel's `CANCEL_CONFIRM_WINDOW` and the label ops' `LABELOP_CONFIRM_WINDOW`), scoped to the Queue tab, with no row selection involved (the armed state is a bare timestamp, not an (action, issue) pair, since the dispatch isn't scoped to any one issue). - 9 new offline tests (3 `tests/test_rearm.py`, 6 `tests/test_app.py`) — full TUI suite 129/129 green. - Deliberately **not** live-smoke-verified against a real dispatch: unlike #615's disposable scratch-issue label writes, a real `workflow_dispatch` POST against `swarm.yml` has no disposable equivalent — it would kick an actual swarm run (real compute, real ticket claims), making the "proof" indistinguishable from the write action's real-world side effect. The protocol is instead proven live daily by the bash equivalent it mirrors (`run-swarm.sh` via `claim-lib.sh`'s `rearm_dispatch`, plus `forgejo-lib-test.sh`'s and `self-rearm-test.sh`'s existing fake-curl coverage of that same call); the new offline suite pins the Python side of the identical shape. - `STATUS.md` and `.sandcastle/tui/README.md` updated in the same commit (`cc304a5`, pushed to `main`). - Answering parked asks (the one remaining engage write action) split into follow-up **#618**, filed `ready-for-session`, per the same #607/#611/#613/#614/#615 precedent — advances #618.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#617
No description provided.