Make dispatch overrides recover stale prelaunch blockers #1222

Merged
coilysiren merged 2 commits from issue-1196 into main 2026-07-14 02:11:33 +00:00
Member

This repair returns repo-working backpressure to issue-thread authority. Local Docker and reservation cache are now diagnostic only, the terminal ghost row case is covered, and clearing the cache folder no longer changes capacity.

  • What changed: the repo count comes from the issue thread first, with local Docker only as the unsupported-tracker fallback, and tests now cover terminal ghost rows plus whole-folder cache clears.
  • Why: stale local launch rows and reservation files were being treated like authority and could block dispatch after the issue thread had already gone terminal.
  • Test and CI: ward exec test and pre-commit run --all-files passed. The review gate was intentionally skipped because the temporary ward default is pending brokered QA.

closes #1196
closes #1222
ward.workflow: pull-request-and-merge

This repair returns repo-working backpressure to issue-thread authority. Local Docker and reservation cache are now diagnostic only, the terminal ghost row case is covered, and clearing the cache folder no longer changes capacity. - What changed: the repo count comes from the issue thread first, with local Docker only as the unsupported-tracker fallback, and tests now cover terminal ghost rows plus whole-folder cache clears. - Why: stale local launch rows and reservation files were being treated like authority and could block dispatch after the issue thread had already gone terminal. - Test and CI: `ward exec test` and `pre-commit run --all-files` passed. The review gate was intentionally skipped because the temporary ward default is pending brokered QA. closes #1196 closes #1222 ward.workflow: pull-request-and-merge
fix: recover stale prelaunch repo blockers
All checks were successful
test / test (pull_request) Successful in 33s
e1d9948cba
closes #1196
Author
Member

WARDED_WORKFLOW review-note

verdict: block
confidence: high

summary: PR 1222 moves repo working backpressure away from issue-thread authority and onto local agentListRows() state. That regresses the multi-node contract and still does not recover the live terminal-but-fresh ghost shape that blocked ward#1221 after ward#1194 was closed.

findings:

  • severity: high
    file: cmd/ward/agent_repo_working_backpressure.go
    line: 140
    problem: repoEngineerBackpressureSnapshot now counts r.agentListRows(ctx) as the source of repo launch pressure instead of scanning the issue thread.
    impact: This makes local Docker / local reservation cache authoritative for repo capacity again. In a multi-node setup, another node cannot see those rows, and a stale local launch intent can still consume capacity after the issue thread has a terminal WARDED_WORKFLOW outcome. The current 1194 state shows exactly that: Forgejo is closed and Docker has no 1194 container, but ward agent list still reports 1194 as container starting.
  • severity: high
    file: cmd/ward/agent_repo_working_backpressure.go
    line: 122
    problem: --override-reservation only subtracts StalePrelaunch; fresh local launch intents remain blocking even when the issue thread has already retracted the reservation via a terminal outcome.
    impact: This does not fix the operator recovery case that just blocked ward#1221. A terminal-but-fresh ghost remains in Active, so dispatch still fails at the repo limit until the short launch TTL expires or host cache is manually cleared.
  • severity: medium
    file: cmd/ward/agent_capacity_test.go
    line: 369
    problem: The new stale-prelaunch tests seed issue-thread reservations for three active issues, but the implementation ignores the issue-thread rows and passes based on local Docker/reservation fixtures.
    impact: The tests no longer prove the issue-backed authority contract. They would pass even if remote reservations from another node were invisible to this host.

conclusion: PR 1222 should not merge as-is. The repair should keep the issue thread as canonical authority, use local list/reservation data only as cache or diagnostic enrichment, and make --override-reservation ignore/reclaim terminal-outcome launch ghosts, not just TTL-stale prelaunch files.

WARDED_WORKFLOW review-note verdict: block confidence: high summary: PR 1222 moves repo working backpressure away from issue-thread authority and onto local `agentListRows()` state. That regresses the multi-node contract and still does not recover the live terminal-but-fresh ghost shape that blocked ward#1221 after ward#1194 was closed. findings: - severity: high file: cmd/ward/agent_repo_working_backpressure.go line: 140 problem: `repoEngineerBackpressureSnapshot` now counts `r.agentListRows(ctx)` as the source of repo launch pressure instead of scanning the issue thread. impact: This makes local Docker / local reservation cache authoritative for repo capacity again. In a multi-node setup, another node cannot see those rows, and a stale local launch intent can still consume capacity after the issue thread has a terminal `WARDED_WORKFLOW` outcome. The current 1194 state shows exactly that: Forgejo is closed and Docker has no 1194 container, but `ward agent list` still reports 1194 as `container starting`. - severity: high file: cmd/ward/agent_repo_working_backpressure.go line: 122 problem: `--override-reservation` only subtracts `StalePrelaunch`; fresh local launch intents remain blocking even when the issue thread has already retracted the reservation via a terminal outcome. impact: This does not fix the operator recovery case that just blocked ward#1221. A terminal-but-fresh ghost remains in `Active`, so dispatch still fails at the repo limit until the short launch TTL expires or host cache is manually cleared. - severity: medium file: cmd/ward/agent_capacity_test.go line: 369 problem: The new stale-prelaunch tests seed issue-thread reservations for three active issues, but the implementation ignores the issue-thread rows and passes based on local Docker/reservation fixtures. impact: The tests no longer prove the issue-backed authority contract. They would pass even if remote reservations from another node were invisible to this host. conclusion: PR 1222 should not merge as-is. The repair should keep the issue thread as canonical authority, use local list/reservation data only as cache or diagnostic enrichment, and make `--override-reservation` ignore/reclaim terminal-outcome launch ghosts, not just TTL-stale prelaunch files.
Author
Member

WARD-RESERVATION: held 🔒

reservation details

Holder: container engineer-codex-ward-1222 on host KAI-DESKTOP-TOWER.

Reserved by ward agent --harness codex (reserved 2026-07-14T01:39:34Z). Concurrent ward agent runs are blocked until it finishes or the reservation goes stale (3h TTL). --override-reservation 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#1222 · branch issue-1222 · harness codex · workflow pull-request-and-merge
  • Run: engineer-codex-ward-1222 · ward v0.649.0 · dispatched 2026-07-14T01:39:33Z
  • 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.649.0).

— Codex, via ward agent

<!-- ward-agent-reservation --> WARD-RESERVATION: held 🔒 <details><summary>reservation details</summary> Holder: container `engineer-codex-ward-1222` on host `KAI-DESKTOP-TOWER`. Reserved by `ward agent --harness codex` (reserved 2026-07-14T01:39:34Z). Concurrent `ward agent` runs are blocked until it finishes or the reservation goes stale (3h TTL). `--override-reservation` 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#1222` · branch `issue-1222` · harness `codex` · workflow `pull-request-and-merge` - **Run:** `engineer-codex-ward-1222` · ward `v0.649.0` · dispatched `2026-07-14T01:39:33Z` - **Comment thread:** 1 included in the pre-flight read, 0 stripped (ward's own automated comments). - included: @coilyco-ops (2026-07-14T00:30:22Z) Static container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.649.0). </details> </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
fix: restore issue-thread authority for repo backpressure
All checks were successful
test / test (pull_request) Successful in 1m56s
32d01339c9
Author
Member

WARD-OUTCOME: submitted

details

workflow: pull-request-and-merge; review summary: skipped: the review gate was intentionally skipped because the temporary ward default is pending brokered QA.

Implemented issue-thread authority for repo backpressure, removed the local cache from the decision path, and covered the terminal ghost row plus cache-folder clear case.

confidence: high. surprise: the unsupported-tracker fallback still needs a small repo-scoped Docker filter, but it stays off the Forgejo path.

follow-ups: merge the green PR when the director sweep runs.

WARD-OUTCOME: submitted <details><summary>details</summary> workflow: pull-request-and-merge; review summary: skipped: the review gate was intentionally skipped because the temporary ward default is pending brokered QA. Implemented issue-thread authority for repo backpressure, removed the local cache from the decision path, and covered the terminal ghost row plus cache-folder clear case. confidence: high. surprise: the unsupported-tracker fallback still needs a small repo-scoped Docker filter, but it stays off the Forgejo path. follow-ups: merge the green PR when the director sweep runs. </details>
Sign in to join this conversation.
No description provided.