Skip to content

Console: FR-U19 now admits team resume, which ADR-0012 and the CLI contract still exclude #79

Description

@dichovsky

Follow-up to #25, which #64 closed. #64 added "resuming a Team" to FR-U19's enumeration (docs/design/srs.md:803-806). That resolved the original contradiction — POST /api/team/resume is registered at src/ui/server.ts:272 and was previously outside a closed "shall be limited to" list — but it left three documents disagreeing where two of them previously agreed. The routine's review on #64 raised this before the merge; recording it here so the remaining work is tracked on an open issue rather than a closed one.

Current state on main:

  1. docs/adr/0012-optional-local-ui-server.md:38-41 (status accepted, authority level 1) is itself a closed enumeration: "The Console offers only the approved Operator actions. These are: send a Message, create a Task, approve a Submission or send it back, launch a Team without attaching to it, stop a Team, peek at a pane's text …, and run prune or clean behind a typed confirmation." Resume is absent. ADR-0013 supersedes only ADR-0012's presentation and confirmation specifics (docs/adr/README.md:17); ADR-0017 amended the surface for archive/restore and said so explicitly (0017:42-43). Nothing amends it for resume. So level 2 now permits what level 1 excludes.
  2. docs/design/cli-contract.md:391-393 closes the same list: "…and archiving or restoring an Agent — and nothing else." Before docs: authorize the Console team-resume action in FR-U19 #64 this agreed with FR-U19; now it contradicts it. docs/README.md and CONTRIBUTING.md:86 both require the lower-authority document to be fixed in the same change.
  3. docs/adr/0017-console-now-view-theme-and-agent-archive.md:77-79 states the governing convention: "reviewers of future Console changes should treat FR-U19's enumeration, not 'whatever's already wired,' as the actual boundary — anything beyond it needs its own FR." "resuming a Team" is now the only entry in FR-U19 with no governing requirement anywhere in the SRS. Every other item has one: launch → FR-U20, stop → FR-U26–U29, peek → FR-U24, prune/clean → FR-U25, archive/restore → FR-U36.

Two supporting facts. git log -S"'/api/team/resume'" returns only 091976a ("Initial public release") — the route predates ADR-0017 and has never been authorized at any level. And grep -rn "api/team/resume" tests/ e2e/ returns nothing: TEAM_POSTS (tests/integration/ui-server-team.test.ts:266-271) and ACTION_PATHS (tests/integration/ui-server-actions.test.ts:113-120) both omit the route, so FR-U19's *Verify:* clause names two files that do not exercise the item it now enumerates.

Impact: the SRS asserts a Console capability that the repo's highest-authority document forbids and its CLI contract denies with "and nothing else". A future reviewer citing ADR-0012 to argue the resume route is unauthorized would be reading the authority order correctly. The write surface's bounding requirement is also the least-tested entry in its own enumeration.

Decision needed first: should Console team-resume be an approved Operator action? If yes, it needs ADR authorization and the steps below follow. If no, the route and its browser affordance come out instead (src/ui/server.ts:272, :492-493; src/ui/actions.ts:377; web/app.tsx:331-333; web/components/operations.tsx:139-142) — a breaking change to a capability shipped in 0.1.0, which warrants its own issue and is not what this issue proposes.

Acceptance (assuming yes):

  • A new ADR, or an amendment section in ADR-0017's style, records that Console team-resume is an approved Operator action and supersedes ADR-0012:38-41 on that one point, carrying the argument ADR-0017:44-47 makes for archive/restore: it reuses runTeamResume, the operation the CLI already exposes, over the same Store methods with the same authority, inventing no new capability. It states that resume is constructive rather than destructive and so is deliberately not FR-U25-gated. docs/adr/README.md and docs/design/decisions.md updated in the same change.
  • A companion Console-resume FR in the FR-U36 mould: detached relaunch (the FR-U20 analogue); the preconditions in src/launcher/resume.ts (clean-stop marker and stored launch-plan.json both present; no live session of that name → ALREADY_EXISTS; stored plan must equal a freshly built one → TEAM_DRIFT; every planned Agent still exactly its archived row); reuse of the same Store authority (FR-U18); not FR-U25-gated; and the GET /api/resumable-sessions read (the FR-U35 analogue).
  • FR-U19's "resuming a Team" gains a (FR-Uxx) pointer to that requirement, matching how (FR-U36) reads today.
  • cli-contract.md:391-393 widened to include resuming a cleanly stopped Team crew owns, noting it is not confirmation-gated. GET /api/resumable-sessions documented at :405-411, where GET /api/sessions already is.
  • ['/api/team/resume', { session: SESSION }] added to TEAM_POSTS and /api/team/resume to ACTION_PATHS, bringing the route under the existing token/Host posture and malformed-body sweeps. Before the fix, a describe('POST /api/team/resume') block asserting 401 without a token fails for absence of coverage.

Out of scope: FR-U34's Operations-view enumeration (srs.md:895-898) omits the resume affordance the Console renders (web/components/operations.tsx:121-124, tested at web/components/operations.test.tsx:98), but that list is descriptive rather than closed — fold it in only if convenient. Also out of scope: src/ui/server.ts:58's stale "four FR-U19 action writes" count and the header omission in #60; the wider CLI-contract drift in #28; the crew team resume CLI requirements in #3 / PR #49, which never touch FR-U19.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationhelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions