Skip to content

Report Phase working/idle state to Herdr#64

Merged
maxBRT merged 2 commits into
mainfrom
ship/20260721-182654.767181845
Jul 21, 2026
Merged

Report Phase working/idle state to Herdr#64
maxBRT merged 2 commits into
mainfrom
ship/20260721-182654.767181845

Conversation

@maxBRT

@maxBRT maxBRT commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

Ship Phases no longer rely on Cursor screen-detection cues for multiplexer sidebars. When HERDR_ENV / HERDR_SOCKET_PATH / HERDR_PANE_ID are set, the Run orchestrator reports working at Phase start (with the same Iteration · Phase · Ticket label as the throbber) and idle on every exit path via herdr pane report-agent. Outside Herdr the reporter is a no-op, so normal terminals and CI are unchanged.

Linked issues

RISK

  • Stale working state in Herdr sidebar (low–medium): if Ship is killed hard (SIGKILL) mid-Phase, the deferred idle report never runs and the Agents row can stay on working until Herdr’s own timeout/fallback. Affected: operators watching Ship inside a Herdr pane.
  • Wrong or missing sidebar status if Herdr CLI/env contract drifts (low): reports shell out to herdr (or HERDR_BIN_PATH). A breaking CLI change or incomplete env still no-ops or fails best-effort and does not Abort the Run, but the sidebar may stay wrong. Affected: Herdr users only.
  • Brief herdr process spawn per Phase boundary (very low): each Working/Idle call execs the CLI when under Herdr. Unlikely to matter unless Phase boundaries are extremely frequent; does not change Agent work itself.

QA — stress-test plan for a human

  1. Happy path

    • Outside Herdr: go test ./..., staticcheck ./..., and a normal ship Run (or --help / dry queue) in a plain terminal. Confirm no herdr invocations and no behavior change on the throbber (Iteration N · Phase · #ticket).
    • Inside a Herdr pane with HERDR_ENV=1, HERDR_SOCKET_PATH, and HERDR_PANE_ID set: start a Run that reaches at least one Implement Phase (ship-labeled Ticket, confirm queue). While the Phase is running, check the Agents sidebar: Ship/ship:run should show working with a message like Iteration 1 · Implement · #<n> …. When the Phase ends (success), it should return to idle. Repeat for Review and Final if the Run gets that far.
  2. Edges / failure cases

    • Force an Abort mid-Phase (bad Agent, kill the nested agent, or a short timeout): sidebar must still flip to idle after Ship Aborts; unfinished Tickets keep the ship label as before.
    • Under Herdr env but with herdr missing from PATH (or a broken HERDR_BIN_PATH): Run must still complete / Abort normally; missing CLI must not fail the Phase.
    • Partial Herdr env (e.g. HERDR_ENV=1 without HERDR_PANE_ID): must no-op like outside Herdr.
    • Concurrent: leave Ship working in one pane and confirm other panes’ agent rows are unaffected.
  3. Out of scope

    • Cursor screen-manifest TOML tuning, Pi lifecycle hooks, queue picker UX, Implement/Review prompt content, and PR-body wording from Final (unchanged by this branch).

maxBRT added 2 commits July 21, 2026 14:37
Ship Phases no longer rely on Cursor screen-detection cues for multiplexer
sidebars: under HERDR_* env, report-agent marks working for the Phase and
idle on every exit path, and no-ops outside Herdr.
Deduplicate the Iteration/Phase/Ticket join used by wait UI and multiplexer
reports, and rename Herdr Agent to AgentID so it does not clash with the coding Agent port.
@maxBRT
maxBRT merged commit 9c7025b into main Jul 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant