factory design: the factory TUI — fleet/worker-table/incident/ask screens + read-adjacent engage (#607 follow-up) #611

Closed
opened 2026-08-20 03:15:08 +00:00 by matou-build-agent · 2 comments

Context

#573 ("the factory TUI — monitor and engage") shipped the read-only Monitor
tab and #607 ("fleet/live-run/incident/ask screens + engage side") shipped
the Queue tab and a Run tab (live run detail) — .sandcastle/tui/, commits
f721699/525ac93/(this ticket's landing commit). #607 closed on that
delivered slice per its own thread's 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
everything #607 named that isn't cancel-a-run (split out separately — see
the sibling ticket, because that piece needs its own new-mechanism design
pass before any TUI wiring, per #607's own suggestion).

Scope

Read side (still real gaps, not stubs):

  • Worker-class enumeration table — the real first step, still blocked on
    nothing but the work itself. The survey
    (docs/research/2026-08-15-factory-reengineering-survey.md §4) claims
    docs/agents/swarm-atlas.md has a structured table of the 13 worker
    classes; confirmed three times now (both #573 sessions, then #607) that
    it does not — the atlas has the 13 classes in prose only. Build the table
    (probably a new section in swarm-atlas.md, or a small structured file
    under docs/agents/ the TUI can parse directly — a session's call) before
    touching the fleet screen itself.
  • Fleet screen — hosts × the 13 worker classes, stuck-detection surfaced
    (today four workers' failure mode is "exits 0 quietly", per the survey).
    Needs the table above first.
  • Incident/healer view — healer ledgers (per-signature, carrying the
    Mattermost thread id). See .sandcastle/heal-lib.sh/heal.sh for the
    ledger shape.
  • Ask inbox — parked ask-human.sh threads.

Engage side — the composition-of-existing-protocols half only (all
two-way doors under ADR 0174, agent-shaped once picked up, per #573's own
ruling):

  • Answer parked asks by speaking the ask-thread protocol
    (ask-human.sh/post-issue-ask.sh/resume-parked-asks.sh).
  • Arm/park/prioritise = label writes via the /labels sub-endpoint (see
    docs/agents/issue-tracker.md — a labels field in an issue PATCH is
    silently ignored).
  • Re-arm = rearm_dispatch.

Explicitly NOT this ticket: cancelling a live run — see the sibling
follow-up ticket; it is a genuinely new kill-path mechanism
(RunOptions.signal/AbortSignal is unused today, no rollback pattern
exists), not composition of existing protocols, and needs its own design
pass before any TUI wiring lands.

Suggested next slice

Same shape as #573/#607's own slice-by-slice history: the worker-class table
is the natural first step (it unblocks the fleet screen and is pure
research+doc work, no new mechanism); ask inbox or incident/healer view are
likely the next-cheapest read-only pieces since their data already exists in
heal-lib.sh's ledger and ask-human.sh's marker files, same pattern as
recent_attempts/open_processes before this ticket.

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

## Context #573 ("the factory TUI — monitor and engage") shipped the read-only Monitor tab and #607 ("fleet/live-run/incident/ask screens + engage side") shipped the Queue tab and a Run tab (live run detail) — `.sandcastle/tui/`, commits `f721699`/`525ac93`/(this ticket's landing commit). #607 closed on that delivered slice per its own thread's 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 everything #607 named that isn't cancel-a-run (split out separately — see the sibling ticket, because that piece needs its own new-mechanism design pass before any TUI wiring, per #607's own suggestion). ## Scope **Read side (still real gaps, not stubs):** - **Worker-class enumeration table** — the real first step, still blocked on nothing but the work itself. The survey (`docs/research/2026-08-15-factory-reengineering-survey.md` §4) claims `docs/agents/swarm-atlas.md` has a structured table of the 13 worker classes; confirmed **three** times now (both #573 sessions, then #607) that it does not — the atlas has the 13 classes in prose only. Build the table (probably a new section in `swarm-atlas.md`, or a small structured file under `docs/agents/` the TUI can parse directly — a session's call) before touching the fleet screen itself. - **Fleet screen** — hosts × the 13 worker classes, stuck-detection surfaced (today four workers' failure mode is "exits 0 quietly", per the survey). Needs the table above first. - **Incident/healer view** — healer ledgers (per-signature, carrying the Mattermost thread id). See `.sandcastle/heal-lib.sh`/`heal.sh` for the ledger shape. - **Ask inbox** — parked `ask-human.sh` threads. **Engage side — the composition-of-existing-protocols half only (all two-way doors under ADR 0174, agent-shaped once picked up, per #573's own ruling):** - Answer parked asks by speaking the ask-thread protocol (`ask-human.sh`/`post-issue-ask.sh`/`resume-parked-asks.sh`). - Arm/park/prioritise = label writes via the `/labels` sub-endpoint (see `docs/agents/issue-tracker.md` — a `labels` field in an issue PATCH is silently ignored). - Re-arm = `rearm_dispatch`. **Explicitly NOT this ticket:** cancelling a live run — see the sibling follow-up ticket; it is a genuinely new kill-path mechanism (`RunOptions.signal`/`AbortSignal` is unused today, no rollback pattern exists), not composition of existing protocols, and needs its own design pass before any TUI wiring lands. ## Suggested next slice Same shape as #573/#607's own slice-by-slice history: the worker-class table is the natural first step (it unblocks the fleet screen and is pure research+doc work, no new mechanism); ask inbox or incident/healer view are likely the next-cheapest read-only pieces since their data already exists in `heal-lib.sh`'s ledger and `ask-human.sh`'s marker files, same pattern as `recent_attempts`/`open_processes` before this ticket. Ruled by agent under ADR 0174 (scope split, revertible/provable, no one-way-door): filed `ready-for-session` to match #573/#607's own label — this is factory/dev tooling requiring the session's host standing, not Ben.
Owner

This was generated by AI during triage.

Triage

Category: enhancement. State: ready-for-session.

The issue body already carries a ruling ("Ruled by agent under ADR 0174 ...
filed ready-for-session") from filing time, but the label was never
actually applied via the /labels sub-endpoint (only the body text stated
it) — closing that gap now.

Confirming the ruling holds: checked docs/agents/swarm-atlas.md for a
structured worker-class table — none found (prose only), matching the
ticket's claim (confirmed a fourth time now). No .out-of-scope/ entry
matches this request; not already implemented. ready-for-session (not
ready-for-agent) is correct per docs/agents/triage-labels.md: this is
factory/dev tooling needing the session's host standing, matching the
#573/#607 precedent — not a swarm-worker-pickable task, and not one of
Ben's one-way doors.

The design-to-agent system's needs-design gate does not apply — this
ticket has no reference to a docs/ux/flows/*.mermaid or
docs/ux/wireframes/*.html contract; it is internal factory/dev tooling, not
a member-facing product feature.

> *This was generated by AI during triage.* ## Triage Category: `enhancement`. State: `ready-for-session`. The issue body already carries a ruling ("Ruled by agent under ADR 0174 ... filed `ready-for-session`") from filing time, but the label was never actually applied via the `/labels` sub-endpoint (only the body text stated it) — closing that gap now. **Confirming the ruling holds:** checked `docs/agents/swarm-atlas.md` for a structured worker-class table — none found (prose only), matching the ticket's claim (confirmed a fourth time now). No `.out-of-scope/` entry matches this request; not already implemented. `ready-for-session` (not `ready-for-agent`) is correct per `docs/agents/triage-labels.md`: this is factory/dev tooling needing the session's host standing, matching the `#573`/`#607` precedent — not a swarm-worker-pickable task, and not one of Ben's one-way doors. The design-to-agent system's `needs-design` gate does not apply — this ticket has no reference to a `docs/ux/flows/*.mermaid` or `docs/ux/wireframes/*.html` contract; it is internal factory/dev tooling, not a member-facing product feature.
Author
Member

Ruled by agent under ADR 0174 — veto anytime: closing on a delivered, proven slice rather than leaving this open across sessions (the #573/#607 threads' own correction — a ready-for-session ticket left open scores "no progress" under the session-runner rules). Followed the ticket's own "Suggested next slice" exactly: worker-class table first (pure research+doc, no new mechanism), then the Fleet screen it unblocked.

What landed — commit b571df3 on main:

  • docs/agents/worker-classes.json — the real worker-class enumeration table (trigger/host/lock/writes/stuck-signal, 13 classes), source-verified against every named script/workflow, not copied from the 2026-08-15 survey's prose (which claimed swarm-atlas.md already had this — confirmed wrong for the third time, after #573 x2 and #607). Pointed to from a new docs/agents/swarm-atlas.md §9.
  • Confirmed the survey's three named invisible-failure workers (healer, rehearsal executor, reporter — all exit 0 even when broken) plus a fourth the survey left unnamed: session-runner.sh — every one of its 13 exit paths is exit 0 (including its own two-strikes escalation), and it never appears in Forgejo Actions at all, so a dead cron entry has zero visible tell. Flagged in the JSON's invisible_failure_note with the reasoning and two runner-up candidates, in case a stronger fourth turns up later.
  • Fleet tab in .sandcastle/tui/app.py (data/worker_classes.py, new): one row per (host, worker-class) pair — 17 rows over the 13 classes (several run on both hosts) — sourced straight from the JSON above. Doc-maintained data, not live host state, so it loads once on mount rather than polling like the other three tabs.
  • 10 new offline tests, 51/51 green (.venv/bin/python -m pytest tests/ -v). Live-smoke-verified against the real docs/agents/worker-classes.json in this checkout (17 rows, invisible-flag correct for healer/rehearsal-executor/reporter/session-runner) and a full run_test() mount of the actual app — not just the unit-level module.
  • STATUS.md updated in the same commit per this repo's convention.

What did not land — split into #613 (ready-for-session, same label as this ticket): incident/healer view, ask inbox, and the engage-side composition (answer parked asks, arm/park/prioritise via label writes, rearm_dispatch) — the ticket named more read screens plus the engage side than fit in one slice, same split #607 used to produce #611/#612. Cancel-a-run stays out of scope everywhere (that's #612, its own new-mechanism design pass, unchanged by this session).

Closing #611 now.

Ruled by agent under ADR 0174 — veto anytime: closing on a delivered, proven slice rather than leaving this open across sessions (the #573/#607 threads' own correction — a ready-for-session ticket left open scores "no progress" under the session-runner rules). Followed the ticket's own "Suggested next slice" exactly: worker-class table first (pure research+doc, no new mechanism), then the Fleet screen it unblocked. **What landed** — commit `b571df3` on `main`: - **`docs/agents/worker-classes.json`** — the real worker-class enumeration table (trigger/host/lock/writes/stuck-signal, 13 classes), source-verified against every named script/workflow, not copied from the 2026-08-15 survey's prose (which claimed `swarm-atlas.md` already had this — confirmed wrong for the third time, after #573 x2 and #607). Pointed to from a new `docs/agents/swarm-atlas.md` §9. - Confirmed the survey's three named invisible-failure workers (healer, rehearsal executor, reporter — all `exit 0` even when broken) **plus a fourth the survey left unnamed**: `session-runner.sh` — every one of its 13 exit paths is `exit 0` (including its own two-strikes escalation), and it never appears in Forgejo Actions at all, so a dead cron entry has zero visible tell. Flagged in the JSON's `invisible_failure_note` with the reasoning and two runner-up candidates, in case a stronger fourth turns up later. - **Fleet tab** in `.sandcastle/tui/app.py` (`data/worker_classes.py`, new): one row per (host, worker-class) pair — 17 rows over the 13 classes (several run on both hosts) — sourced straight from the JSON above. Doc-maintained data, not live host state, so it loads once on mount rather than polling like the other three tabs. - 10 new offline tests, 51/51 green (`.venv/bin/python -m pytest tests/ -v`). Live-smoke-verified against the real `docs/agents/worker-classes.json` in this checkout (17 rows, invisible-flag correct for healer/rehearsal-executor/reporter/session-runner) and a full `run_test()` mount of the actual app — not just the unit-level module. - `STATUS.md` updated in the same commit per this repo's convention. **What did not land — split into #613** (`ready-for-session`, same label as this ticket): incident/healer view, ask inbox, and the engage-side composition (answer parked asks, arm/park/prioritise via label writes, `rearm_dispatch`) — the ticket named more read screens plus the engage side than fit in one slice, same split #607 used to produce #611/#612. Cancel-a-run stays out of scope everywhere (that's #612, its own new-mechanism design pass, unchanged by this session). Closing #611 now.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#611
No description provided.