Make director-surface Docker socket fix reach live first-run cleanup #1011

Closed
opened 2026-07-10 10:18:41 +00:00 by coilyco-ops · 8 comments
Member

Problem

ward#1001 closed through merged PR ward#1010 at 2026-07-10T10:17:18Z, but the active read-only director surface used for infrastructure#520 still cannot run the cleanup path that issue was meant to restore.

Live evidence from this surface after the merge:

$ ward --version
ward version v0.573.0

$ ls -l /var/run/docker.sock && id
ls: cannot access '/var/run/docker.sock': No such file or directory

$ ward agent reap
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
ward: list running engineer containers: exit status 1

warded stop engineer-codex-ward-1001 did work through the broker and freed one slot, so the brokered control path exists. The local in-surface reaper path still does not.

This matters for infrastructure#520 because the loop needs to clean up stale/closed engineers while hammering the first-run flow. A source-only fix that helps future containers but leaves the current director unable to reap still blocks the active acceptance loop.

Do

  • Inspect what ward#1010 changed and why the current director surface still has no /var/run/docker.sock.
  • Make the fix effective for newly launched director surfaces and document whether already-running surfaces require restart or cannot be repaired in place.
  • If live surfaces cannot be repaired in place, make ward agent reap or the director seed text explicitly point agents at the supported brokered cleanup command instead of claiming a mounted socket exists.
  • Ensure closed PR or closed issue cleanup frees the corresponding engineer-* container without requiring a local Docker socket in the surface.
  • Keep this as a rollout/runtime follow-up, not a reimplementation of the already-merged source patch.

Acceptance

  • A fresh read-only director surface can either run ward agent reap successfully or gets an actionable supported cleanup command that works from the surface.
  • The active #520 loop has a reliable way to stop stale or closed engineer containers without direct host Docker access.
  • warded list no longer keeps closed-issue engineers like engineer-codex-ward-1001 running after cleanup.
  • The issue comment or docs state clearly whether already-running director surfaces need to be restarted to receive socket-mount changes.
  • Tests or startup diagnostics cover the no-/var/run/docker.sock case.

Related: coilyco-flight-deck/ward#1001, coilyco-flight-deck/ward#1010, and coilyco-flight-deck/infrastructure#520.

## Problem `ward#1001` closed through merged PR `ward#1010` at 2026-07-10T10:17:18Z, but the active read-only director surface used for `infrastructure#520` still cannot run the cleanup path that issue was meant to restore. Live evidence from this surface after the merge: ```text $ ward --version ward version v0.573.0 $ ls -l /var/run/docker.sock && id ls: cannot access '/var/run/docker.sock': No such file or directory $ ward agent reap Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? ward: list running engineer containers: exit status 1 ``` `warded stop engineer-codex-ward-1001` did work through the broker and freed one slot, so the brokered control path exists. The local in-surface reaper path still does not. This matters for `infrastructure#520` because the loop needs to clean up stale/closed engineers while hammering the first-run flow. A source-only fix that helps future containers but leaves the current director unable to reap still blocks the active acceptance loop. ## Do * Inspect what `ward#1010` changed and why the current director surface still has no `/var/run/docker.sock`. * Make the fix effective for newly launched director surfaces and document whether already-running surfaces require restart or cannot be repaired in place. * If live surfaces cannot be repaired in place, make `ward agent reap` or the director seed text explicitly point agents at the supported brokered cleanup command instead of claiming a mounted socket exists. * Ensure closed PR or closed issue cleanup frees the corresponding `engineer-*` container without requiring a local Docker socket in the surface. * Keep this as a rollout/runtime follow-up, not a reimplementation of the already-merged source patch. ## Acceptance * A fresh read-only director surface can either run `ward agent reap` successfully or gets an actionable supported cleanup command that works from the surface. * The active #520 loop has a reliable way to stop stale or closed engineer containers without direct host Docker access. * `warded list` no longer keeps closed-issue engineers like `engineer-codex-ward-1001` running after cleanup. * The issue comment or docs state clearly whether already-running director surfaces need to be restarted to receive socket-mount changes. * Tests or startup diagnostics cover the no-`/var/run/docker.sock` case. Related: coilyco-flight-deck/ward#1001, coilyco-flight-deck/ward#1010, and coilyco-flight-deck/infrastructure#520.
Author
Member

WARD-RESERVATION: held 🔒

reservation details

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

Reserved by ward agent --harness codex (reserved 2026-07-10T10:18:49Z). 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#1011 · branch issue-1011 · harness codex · workflow pull-requests-and-merge
  • Run: engineer-codex-ward-1011 · ward v0.573.0 · dispatched 2026-07-10T10:18:49Z
  • 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.573.0).

— Codex, via ward agent

<!-- ward-agent-reservation --> WARD-RESERVATION: held 🔒 <details><summary>reservation details</summary> Holder: container `engineer-codex-ward-1011` on host `kais-macbook-pro-2.local`. Reserved by `ward agent --harness codex` (reserved 2026-07-10T10:18:49Z). 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#1011` · branch `issue-1011` · harness `codex` · workflow `pull-requests-and-merge` - **Run:** `engineer-codex-ward-1011` · ward `v0.573.0` · dispatched `2026-07-10T10:18:49Z` - **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.573.0). </details> </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
Author
Member

WARD-OUTCOME: blocked 🛑

details workflow: pull-requests-and-merge; review summary: review gate skipped by ~/.ward/config.yaml default

CI failed on go test for PR #1018. Local ward exec test and go test ./... reproduction in this checkout also fail on repo-baseline drift: missing generated .ward/ward-kdl/*.guardfile.kdl source files and the neutral WARD_CONFIG_REF bundle state.

The reap-hint patch is committed, but this branch is blocked until the generated ward-kdl source bundle or the test harness inputs are restored and the repo-wide test suite can pass.

WARD-OUTCOME: blocked 🛑 <details><summary>details</summary> workflow: pull-requests-and-merge; review summary: review gate skipped by ~/.ward/config.yaml default CI failed on `go test` for PR #1018. Local `ward exec test` and `go test ./...` reproduction in this checkout also fail on repo-baseline drift: missing generated `.ward/ward-kdl/*.guardfile.kdl` source files and the neutral `WARD_CONFIG_REF` bundle state. The reap-hint patch is committed, but this branch is blocked until the generated ward-kdl source bundle or the test harness inputs are restored and the repo-wide test suite can pass. </details>
Author
Member

WARD-RESERVATION: held 🔒

reservation details

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

Reserved by ward agent --harness codex (reserved 2026-07-10T16:49:14Z). 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#1011 · branch issue-1011 · harness codex · workflow pull-requests-and-merge
  • Run: engineer-codex-ward-1011 · ward v0.584.0 · dispatched 2026-07-10T16:49:14Z
  • Comment thread: 1 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-1011` on host `kais-macbook-pro-2.local`. Reserved by `ward agent --harness codex` (reserved 2026-07-10T16:49:14Z). 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#1011` · branch `issue-1011` · harness `codex` · workflow `pull-requests-and-merge` - **Run:** `engineer-codex-ward-1011` · ward `v0.584.0` · dispatched `2026-07-10T16:49:14Z` - **Comment thread:** 1 included in the pre-flight read, 1 stripped (ward's own automated comments). - included: @coilyco-ops (2026-07-10T10:27:45Z) - stripped: @coilyco-ops (2026-07-10T10:18:51Z) 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: review gate skipped by ~/.ward/config.yaml default

Restored the tracked .ward/ward-kdl bundle sources that the current tests and config-source paths expect, plus the missing tailscale placeholder. The director reap path already had the brokered fallback from ward#1010, so the remaining work was bundle drift, not a new behavior patch.

Validation: go test ./cmd/ward -run 'TestCapabilityGuardfilesExist|TestSelectConfigSourceDefaultsBaked|TestRunSetupWithUnsetRef|TestSmartDefaultsBaked|TestBuildUpPlanDirectorSurfaceThreading|TestAgentReapSweepReportsUnsupportedOnReadOnlyDirectorSurface' passed in a neutral env. The broader go test ./cmd/ward still trips unrelated surface/integration noise when run through the ward container env, but PR #1018 is green at the commit status surface.

How it felt: mechanical but messy. The direct fix was small, but the repo was sitting in a mid-transition bundle state, so the work was mostly reconciling tracked inputs and then proving the reap fallback still holds.

Confidence: high on the issue-specific path. Surprise: the issue blocker was not the reap code, it was the missing bundle source set. Follow-up: if the broader cmd/ward suite needs to run in the ward container env, it needs its own surface/env cleanup.

WARD-OUTCOME: merge-ready <details><summary>details</summary> workflow: pull-requests-and-merge; review summary: review gate skipped by ~/.ward/config.yaml default Restored the tracked `.ward/ward-kdl` bundle sources that the current tests and config-source paths expect, plus the missing `tailscale` placeholder. The director reap path already had the brokered fallback from `ward#1010`, so the remaining work was bundle drift, not a new behavior patch. Validation: `go test ./cmd/ward -run 'TestCapabilityGuardfilesExist|TestSelectConfigSourceDefaultsBaked|TestRunSetupWithUnsetRef|TestSmartDefaultsBaked|TestBuildUpPlanDirectorSurfaceThreading|TestAgentReapSweepReportsUnsupportedOnReadOnlyDirectorSurface'` passed in a neutral env. The broader `go test ./cmd/ward` still trips unrelated surface/integration noise when run through the ward container env, but PR #1018 is green at the commit status surface. How it felt: mechanical but messy. The direct fix was small, but the repo was sitting in a mid-transition bundle state, so the work was mostly reconciling tracked inputs and then proving the reap fallback still holds. Confidence: high on the issue-specific path. Surprise: the issue blocker was not the reap code, it was the missing bundle source set. Follow-up: if the broader `cmd/ward` suite needs to run in the ward container env, it needs its own surface/env cleanup. <!-- ward-agent-signature --> </details>
Author
Member

Post-mortem (director surface): PR #1018 for this issue was closed. It reintroduced .ward/ward-kdl/ specgen bundle files, which ward#1009 deleted and forbids restoring. This issue stays open. When the ward open-PR queue is under the backpressure threshold (6), re-cut a clean fix off current main that touches CONSUMER CODE ONLY and never restores .ward/ward-kdl/.

Post-mortem (director surface): PR #1018 for this issue was closed. It reintroduced `.ward/ward-kdl/` specgen bundle files, which ward#1009 deleted and forbids restoring. This issue stays open. When the ward open-PR queue is under the backpressure threshold (6), re-cut a clean fix off current main that touches CONSUMER CODE ONLY and never restores `.ward/ward-kdl/`.
Author
Member

WARD-RESERVATION: held 🔒

reservation details

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

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

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

— Codex, via ward agent

<!-- ward-agent-reservation --> WARD-RESERVATION: held 🔒 <details><summary>reservation details</summary> Holder: container `engineer-codex-ward-1011` on host `KAI-DESKTOP-TOWER`. Reserved by `ward agent --harness codex` (reserved 2026-07-10T23:49:19Z). 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#1011` · branch `issue-1011` · harness `codex` · workflow `pull-requests-and-merge` - **Run:** `engineer-codex-ward-1011` · ward `v0.605.0` · dispatched `2026-07-10T23:49:19Z` - **Comment thread:** 3 included in the pre-flight read, 2 stripped (ward's own automated comments). - included: @coilyco-ops (2026-07-10T10:27:45Z), @coilyco-ops (2026-07-10T17:04:54Z), @coilyco-ops (2026-07-10T19:30:46Z) - stripped: @coilyco-ops (2026-07-10T10:18:51Z), @coilyco-ops (2026-07-10T16:49:15Z) Static container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.605.0). </details> </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
coilyco-ops added
P2
and removed
P1
labels 2026-07-14 06:50:17 +00:00
Author
Member

WARDED_WORKFLOW: reservation-held

reservation details

Holder: launch intent for container engineer-codex-ward-1011 on host kais-macbook-pro-2.local.

Accepted by ward agent --harness codex (reserved 2026-07-14T18:49:42Z). Concurrent ward agent runs are blocked until this intent becomes visible or the intent is released. The stale-intent fallback is still TTL-bounded (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#1011 · branch issue-1011 · harness codex · workflow pull-request-and-merge
  • Run: engineer-codex-ward-1011 · ward v0.689.0 · dispatched 2026-07-14T18:49:32Z
  • Comment thread: 3 included in the pre-flight read, 3 stripped (ward's own automated comments).

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

— Codex, via ward agent

<!-- ward-agent-reservation --> WARDED_WORKFLOW: reservation-held <details><summary>reservation details</summary> Holder: launch intent for container `engineer-codex-ward-1011` on host `kais-macbook-pro-2.local`. Accepted by `ward agent --harness codex` (reserved 2026-07-14T18:49:42Z). Concurrent `ward agent` runs are blocked until this intent becomes visible or the intent is released. The stale-intent fallback is still TTL-bounded (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#1011` · branch `issue-1011` · harness `codex` · workflow `pull-request-and-merge` - **Run:** `engineer-codex-ward-1011` · ward `v0.689.0` · dispatched `2026-07-14T18:49:32Z` - **Comment thread:** 3 included in the pre-flight read, 3 stripped (ward's own automated comments). - included: @coilyco-ops (2026-07-10T10:27:45Z), @coilyco-ops (2026-07-10T17:04:54Z), @coilyco-ops (2026-07-10T19:30:46Z) - stripped: @coilyco-ops (2026-07-10T10:18:51Z), @coilyco-ops (2026-07-10T16:49:15Z), @coilyco-ops (2026-07-10T23:49:18Z) Static container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.689.0). </details> </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
Author
Member

WARDED_WORKFLOW: #1290

details

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

Used the brokered cleanup fallback and documented the restart boundary for live director surfaces. Fresh director sessions mount the socket. Older live sessions now say to restart warded and use ward agent stop <owner/repo#N> until the next launch.

felt: small but precise.
confidence: high.
surprise: repo-wide test gating is still environment-noisy, so I validated the touched paths directly.
follow-up: none.

WARDED_WORKFLOW: https://forgejo.coilysiren.me/coilyco-flight-deck/ward/pulls/1290 <details><summary>details</summary> workflow: pull-request-and-merge; review summary: review gate intentionally skipped because the temporary ward default is pending brokered QA Used the brokered cleanup fallback and documented the restart boundary for live director surfaces. Fresh director sessions mount the socket. Older live sessions now say to restart `warded` and use `ward agent stop <owner/repo#N>` until the next launch. felt: small but precise. confidence: high. surprise: repo-wide test gating is still environment-noisy, so I validated the touched paths directly. 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#1011
No description provided.