Skip director kickoff gate when headless lane is empty #803

Closed
opened 2026-07-09 15:47:08 +00:00 by coilyco-ops · 2 comments
Member

A director run with no headless backlog still asks the init gate whether to drain:

warded director --driver codex --repo coilyco-gaming/factory-game-v3
ward agent director --harness codex: note: codex self-assessment unavailable; skipping startup triage.
backlog: coilyco-gaming/factory-game-v3 (1 repos, 0 tracked)

ward agent director --harness codex: kick off by draining the headless backlog now? [Y/n] ...

That prompt should be skipped when startup triage/refresh leaves nothing queued or in flight. In that case the director should automatically move to the drained/surface path, so the operator sees one interactive surface transition instead of an awkward prompt about draining nothing.

Implementation shape:

  • In runDirectorLoop, take one deterministic startup pass before the init gate: poll, refresh, and mergeEligiblePullRequests.
  • If backlogLaneCounts(be.entries()) returns 0, 0, skip directorKickoff and call directorHandleDrain directly.
  • If anything is queued or in flight, keep the existing one-time kickoff gate behavior unchanged.
  • Update docs/agent-director.md and docs/director-startup-triage.md so the init gate is documented as conditional on outstanding headless work.

Acceptance:

  • Add a heartbeat test proving an empty initial lane does not call confirmKickoff and does call the drain/surface path.
  • Keep or adjust the kickoff error test so errors still propagate when queued work exists.
  • Existing queued-work kickoff tests should still pass.

Closes this issue when landed.

A director run with no headless backlog still asks the init gate whether to drain: ``` warded director --driver codex --repo coilyco-gaming/factory-game-v3 ward agent director --harness codex: note: codex self-assessment unavailable; skipping startup triage. backlog: coilyco-gaming/factory-game-v3 (1 repos, 0 tracked) ward agent director --harness codex: kick off by draining the headless backlog now? [Y/n] ... ``` That prompt should be skipped when startup triage/refresh leaves nothing queued or in flight. In that case the director should automatically move to the drained/surface path, so the operator sees one interactive surface transition instead of an awkward prompt about draining nothing. Implementation shape: * In `runDirectorLoop`, take one deterministic startup pass before the init gate: `poll`, `refresh`, and `mergeEligiblePullRequests`. * If `backlogLaneCounts(be.entries())` returns `0, 0`, skip `directorKickoff` and call `directorHandleDrain` directly. * If anything is queued or in flight, keep the existing one-time kickoff gate behavior unchanged. * Update `docs/agent-director.md` and `docs/director-startup-triage.md` so the init gate is documented as conditional on outstanding headless work. Acceptance: * Add a heartbeat test proving an empty initial lane does not call `confirmKickoff` and does call the drain/surface path. * Keep or adjust the kickoff error test so errors still propagate when queued work exists. * Existing queued-work kickoff tests should still pass. Closes this issue when landed.
Author
Member

WARD-RESERVATION: held 🔒

reservation details

Holder: container engineer-codex-ward-803 on host kais-macbook-pro-2.local.

Reserved by ward agent --harness codex (reserved 2026-07-09T15:47:13Z). Concurrent ward agent runs are blocked until it finishes or the reservation goes stale (1h TTL). --force overrides.

Do not comment on or edit this issue to steer the run while it is reserved. The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a new issue, dispatched fresh. That is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494).

run seed context — what this run is carrying (ward#609)
  • Resolved: coilyco-flight-deck/ward#803 · branch issue-803 · harness codex · workflow pull-request
  • Run: engineer-codex-ward-803 · ward v0.493.0 · dispatched 2026-07-09T15:47:13Z
  • Comment thread: 0 included in the pre-flight read, 0 stripped (ward's own automated comments).

Static container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.493.0).

— Codex, via ward agent

<!-- ward-agent-reservation --> WARD-RESERVATION: held 🔒 <details><summary>reservation details</summary> Holder: container `engineer-codex-ward-803` on host `kais-macbook-pro-2.local`. Reserved by `ward agent --harness codex` (reserved 2026-07-09T15:47:13Z). Concurrent `ward agent` runs are blocked until it finishes or the reservation goes stale (1h TTL). `--force` overrides. **Do not comment on or edit this issue to steer the run while it is reserved.** The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a **new issue, dispatched fresh**. That is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494). <details><summary>run seed context — what this run is carrying (ward#609)</summary> - **Resolved:** `coilyco-flight-deck/ward#803` · branch `issue-803` · harness `codex` · workflow `pull-request` - **Run:** `engineer-codex-ward-803` · ward `v0.493.0` · dispatched `2026-07-09T15:47:13Z` - **Comment thread:** 0 included in the pre-flight read, 0 stripped (ward's own automated comments). Static container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.493.0). </details> </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
Author
Member

WARD-OUTCOME: done

details

workflow: pull-request; review summary: review gate skipped by ~/.ward/config.yaml default
felt: straightforward after splitting the loop helpers and tightening the startup gate
confidence: high
surprise: Forgejo surfaced the failing job as golangci-lint, while local reruns showed the branch was fine
follow-up: none

WARD-OUTCOME: done ✅ <details><summary>details</summary> workflow: pull-request; review summary: review gate skipped by ~/.ward/config.yaml default felt: straightforward after splitting the loop helpers and tightening the startup gate confidence: high surprise: Forgejo surfaced the failing job as `golangci-lint`, while local reruns showed the branch was fine follow-up: none </details>
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
coilyco-flight-deck/ward#803
No description provided.