Repair director queue PR classification from PR #984 review #995

Closed
opened 2026-07-10 09:40:51 +00:00 by coilyco-ops · 6 comments
Member

Problem

PR ward#984 adds the director queue view for stale reservations and redispatch candidates, but review blocked it for a concrete PR classification bug:

cmd/ward/agent_director_queue.go line 231: classifyDirectorQueueOutcome checks item.Kind == backlogKindPullRequest, but classifyDirectorQueuePR stores Kind: backlogEntryKindPrefix(backlogKindPullRequest), which is the display string PR. Done PR carries therefore miss the PR branch and get close stale-open done issue.

The source issue ward#977 is consult-labeled, but this repair is now a self-contained headless correctness fix against the existing PR.

Acceptance criteria

  • classifyDirectorQueueOutcome correctly distinguishes PR rows from issue rows using the representation actually stored on the queue item.
  • Done PR carries are not classified as closeable stale-open issues.
  • Tests cover done PR and done issue outcomes separately.
  • PR #984 is updated or replaced with the repaired implementation.
## Problem PR `ward#984` adds the director queue view for stale reservations and redispatch candidates, but review blocked it for a concrete PR classification bug: ```text cmd/ward/agent_director_queue.go line 231: classifyDirectorQueueOutcome checks item.Kind == backlogKindPullRequest, but classifyDirectorQueuePR stores Kind: backlogEntryKindPrefix(backlogKindPullRequest), which is the display string PR. Done PR carries therefore miss the PR branch and get close stale-open done issue. ``` The source issue `ward#977` is consult-labeled, but this repair is now a self-contained headless correctness fix against the existing PR. ## Acceptance criteria * `classifyDirectorQueueOutcome` correctly distinguishes PR rows from issue rows using the representation actually stored on the queue item. * Done PR carries are not classified as closeable stale-open issues. * Tests cover done PR and done issue outcomes separately. * PR #984 is updated or replaced with the repaired implementation.
Author
Member

WARD-DISPATCH: deferred ⏸

deferred details

This forwarded dispatch was deferred after the issue was already reserved.

Attempted harness: codex
Attempted run: ward agent engineer coilyco-flight-deck/ward#995 --harness codex --details Fix ward#995 by repairing the PR kind classification bug found in review of ward PR #984. Update the existing PR branch or replace it, add focused tests for PR vs issue outcomes, and close ward#995 when landed.
Container: engineer-codex-ward-995
Container created: no running engineer was observed.
Host log: /Users/kai/.ward/agent-logs/dispatch/20260710T094057Z-director-codex-zv99-coilyco-flight-deck-ward-995.log
Capacity: ward agent engineer --harness codex: global engineer limit is reached: 12 running (limit 12); wait for a run to finish or run ward agent reap for stale engineers

Retry: the issue stays queued and the director will try again when a slot opens.

— Codex, via ward agent

<!-- ward-agent-reservation-released --> <!-- ward-needs-redispatch --> WARD-DISPATCH: deferred ⏸ <details><summary>deferred details</summary> This forwarded dispatch was deferred after the issue was already reserved. Attempted harness: `codex` Attempted run: `ward agent engineer coilyco-flight-deck/ward#995 --harness codex --details Fix ward#995 by repairing the PR kind classification bug found in review of ward PR #984. Update the existing PR branch or replace it, add focused tests for PR vs issue outcomes, and close ward#995 when landed.` Container: `engineer-codex-ward-995` Container created: no running engineer was observed. Host log: `/Users/kai/.ward/agent-logs/dispatch/20260710T094057Z-director-codex-zv99-coilyco-flight-deck-ward-995.log` Capacity: `ward agent engineer --harness codex: global engineer limit is reached: 12 running (limit 12); wait for a run to finish or run `ward agent reap` for stale engineers` Retry: the issue stays queued and the director will try again when a slot opens. </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
Author
Member

WARD-RESERVATION: held 🔒

reservation details

Holder: container engineer-claude-ward-995 on host kais-macbook-pro-2.local.

Reserved by ward agent --harness claude (reserved 2026-07-10T17:00:27Z). 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#995 · branch issue-995 · harness claude · workflow pull-requests-and-merge
  • Run: engineer-claude-ward-995 · ward v0.584.0 · dispatched 2026-07-10T17:00:27Z
  • Comment thread: 1 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.584.0).

— Claude (she/her), via ward agent

<!-- ward-agent-reservation --> WARD-RESERVATION: held 🔒 <details><summary>reservation details</summary> Holder: container `engineer-claude-ward-995` on host `kais-macbook-pro-2.local`. Reserved by `ward agent --harness claude` (reserved 2026-07-10T17:00:27Z). 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#995` · branch `issue-995` · harness `claude` · workflow `pull-requests-and-merge` - **Run:** `engineer-claude-ward-995` · ward `v0.584.0` · dispatched `2026-07-10T17:00:27Z` - **Comment thread:** 1 included in the pre-flight read, 0 stripped (ward's own automated comments). - included: @coilyco-ops (2026-07-10T09:40:59Z) Static container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.584.0). </details> </details> <!-- ward-agent-signature --> — Claude (she/her), via `ward agent`
Author
Member

WARD-OUTCOME: merge-ready

details

workflow: pull-requests-and-merge; review summary: skipped - the in-container review gate was intentionally skipped by the ~/.ward/config.yaml default, so no in-container review ran; CI is the check surface.

PR: #1043 (branch issue-995), CI green (test / test success on head 15685fd5), mergeable. Supersedes and closes PR #984 (commented and closed).

What landed:

  • merged the issue-977 queue-view branch from PR #984 into issue-995.
  • repaired the review-blocking bug at the representation seam: directorQueueItem.Kind now stores the canonical backlog kind (backlogKindIssue/backlogKindPullRequest) and the PR/issue display prefix is derived only at render time, so classifyDirectorQueueOutcome's kind check compares like with like and done PR carries get wait, not close-stale-open-done-issue.
  • tests cover done PR and done issue outcomes separately, lock the canonical Kind on every classified item, and assert the rendered view keeps PR/issue prefixes without counting the done PR toward close-done.
  • also carried a hook repair: main's tip (60133a84) left a dead docs/ward-specs.md reference plus an over-cap comment block in configsource.go that failed the agentic-os pre-commit suite (source-doc-refs, code-comments) on every commit in this repo; the comment is now within cap and the monolith-constraint detail moved into docs/config-source.md.

Retrospective: the fix itself was small and felt clean - the bug was a display-string/canonical-kind mismatch, and storing the canonical kind is strictly more robust than fixing the comparison string. The surprise was main being un-committable: 60133a84 must have landed without hooks, and every commit here tripped on it, so the repair had to ride this PR. Confidence high - build/test/vet/lint all green locally (4 consecutive uncached test runs) and CI green on the PR.

Follow-ups worth an issue: main's release pipeline shows persistent publish-kdl-read / publish-kdl-write failures on recent release runs (pre-existing, unrelated to this change).

WARD-OUTCOME: merge-ready <details><summary>details</summary> workflow: pull-requests-and-merge; review summary: skipped - the in-container review gate was intentionally skipped by the ~/.ward/config.yaml default, so no in-container review ran; CI is the check surface. PR: #1043 (branch issue-995), CI green (test / test success on head 15685fd5), mergeable. Supersedes and closes PR #984 (commented and closed). What landed: * merged the issue-977 queue-view branch from PR #984 into issue-995. * repaired the review-blocking bug at the representation seam: directorQueueItem.Kind now stores the canonical backlog kind (backlogKindIssue/backlogKindPullRequest) and the PR/issue display prefix is derived only at render time, so classifyDirectorQueueOutcome's kind check compares like with like and done PR carries get wait, not close-stale-open-done-issue. * tests cover done PR and done issue outcomes separately, lock the canonical Kind on every classified item, and assert the rendered view keeps PR/issue prefixes without counting the done PR toward close-done. * also carried a hook repair: main's tip (60133a84) left a dead docs/ward-specs.md reference plus an over-cap comment block in configsource.go that failed the agentic-os pre-commit suite (source-doc-refs, code-comments) on every commit in this repo; the comment is now within cap and the monolith-constraint detail moved into docs/config-source.md. Retrospective: the fix itself was small and felt clean - the bug was a display-string/canonical-kind mismatch, and storing the canonical kind is strictly more robust than fixing the comparison string. The surprise was main being un-committable: 60133a84 must have landed without hooks, and every commit here tripped on it, so the repair had to ride this PR. Confidence high - build/test/vet/lint all green locally (4 consecutive uncached test runs) and CI green on the PR. Follow-ups worth an issue: main's release pipeline shows persistent publish-kdl-read / publish-kdl-write failures on recent release runs (pre-existing, unrelated to this change). </details>
Author
Member

WARD-RESERVATION: held 🔒

reservation details

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

Reserved by ward agent --harness codex (reserved 2026-07-10T18:02:57Z). 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#995 · branch issue-995 · harness codex · workflow pull-requests-and-merge
  • Run: engineer-codex-ward-995 · ward v0.584.0 · dispatched 2026-07-10T18:02:57Z
  • Comment thread: 2 included in the pre-flight read, 1 stripped (ward's own automated comments).

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

— Codex, via ward agent

<!-- ward-agent-reservation --> WARD-RESERVATION: held 🔒 <details><summary>reservation details</summary> Holder: container `engineer-codex-ward-995` on host `kais-macbook-pro-2.local`. Reserved by `ward agent --harness codex` (reserved 2026-07-10T18:02:57Z). 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#995` · branch `issue-995` · harness `codex` · workflow `pull-requests-and-merge` - **Run:** `engineer-codex-ward-995` · ward `v0.584.0` · dispatched `2026-07-10T18:02:57Z` - **Comment thread:** 2 included in the pre-flight read, 1 stripped (ward's own automated comments). - included: @coilyco-ops (2026-07-10T09:40:59Z), @coilyco-ops (2026-07-10T17:17:09Z) - stripped: @coilyco-ops (2026-07-10T17:00:27Z) Static container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.584.0). </details> </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
Author
Member

WARD-OUTCOME: merge-ready

details

workflow: pull-requests-and-merge; review summary: skipped - the in-container review gate was intentionally skipped by the ~/.ward/config.yaml default, so no in-container review ran; CI is green.

PR: #1043 on issue-995, mergeable, test / test (pull_request) succeeded on 8db427c1.

What landed:

  • merged current main into the existing PR branch.
  • kept the canonical-kind PR classification fix so done PR carries stay on wait.
  • kept the done PR and done issue tests.
  • resolved the configsource comment conflict from main.

Retrospective: small code fix, routine merge cleanup. Confidence high. Surprises: none.

Follow-ups: none.

WARD-OUTCOME: merge-ready <details><summary>details</summary> workflow: pull-requests-and-merge; review summary: skipped - the in-container review gate was intentionally skipped by the ~/.ward/config.yaml default, so no in-container review ran; CI is green. PR: #1043 on `issue-995`, mergeable, `test / test (pull_request)` succeeded on `8db427c1`. What landed: - merged current `main` into the existing PR branch. - kept the canonical-kind PR classification fix so done PR carries stay on `wait`. - kept the done PR and done issue tests. - resolved the configsource comment conflict from `main`. Retrospective: small code fix, routine merge cleanup. Confidence high. Surprises: none. Follow-ups: none. </details>
Author
Member

Post-mortem — closed in the 2026-07-10 ward pileup cleanup. Root cause: a Codex director in /goal (slash-goal) mode hammered the goal criteria hard enough to spin off the rails, mass-dispatching engineers with no backpressure, producing ~30 PRs that jammed the merge queue. Prevention now owned by ward#1069 (anti-churn epic), ward#1073 (open-PR backpressure gate, default 6, broker + pre-flight), aos#450 (codex binary + director model upgrade).

PR#1043 was empty (0 commits vs main) — its director-queue-classification change had already landed. Closed as superseded/done.

**Post-mortem — closed in the 2026-07-10 ward pileup cleanup.** Root cause: a Codex director in `/goal` (slash-goal) mode hammered the goal criteria hard enough to spin off the rails, mass-dispatching engineers with no backpressure, producing ~30 PRs that jammed the merge queue. Prevention now owned by ward#1069 (anti-churn epic), ward#1073 (open-PR backpressure gate, default 6, broker + pre-flight), aos#450 (codex binary + director model upgrade). PR#1043 was empty (0 commits vs `main`) — its director-queue-classification change had already landed. Closed as superseded/done.
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#995
No description provided.