Make ward agent logs useful without an explicit target #1567

Closed
opened 2026-07-25 23:55:58 +00:00 by coilyco-ops · 5 comments
Member

ward agent logs currently exits with:

ward: ward agent logs: a target is required: owner/repo#N, a bare #N, or a container name

Desired behavior: when no target is supplied, make ward agent logs use chatty defaults and print the last 100 lines for every container in the current compose group.

Acceptance criteria:

  • ward agent logs with no positional target no longer fails only because the target is omitted.
  • It discovers the relevant current compose group from the local ward/director context.
  • It prints a clear per-container header and the last 100 log lines for each container in that group.
  • Existing explicit target forms keep their current behavior: owner/repo#N, bare #N, and container name.
  • Add focused tests for the no-target default and for preserving explicit-target behavior.
`ward agent logs` currently exits with: ```text ward: ward agent logs: a target is required: owner/repo#N, a bare #N, or a container name ``` Desired behavior: when no target is supplied, make `ward agent logs` use chatty defaults and print the last 100 lines for every container in the current compose group. Acceptance criteria: - `ward agent logs` with no positional target no longer fails only because the target is omitted. - It discovers the relevant current compose group from the local ward/director context. - It prints a clear per-container header and the last 100 log lines for each container in that group. - Existing explicit target forms keep their current behavior: `owner/repo#N`, bare `#N`, and container name. - Add focused tests for the no-target default and for preserving explicit-target behavior.
Author
Member

WARD-WORKFLOW: done

details

workflow: merge-remote-main; review summary: skipped in-container review gate because the temporary ward default pending brokered QA intentionally skipped review.

summary: Implemented no-target ward agent logs compose-group snapshots with per-container headers and a 100-line default; explicit issue-ref and container-name targets stay on the existing single-source path.

retrospective: Felt clean after the broker protocol accepted an empty logs target. The only notable surprise was that brokered engineer containers are not Compose services, so the no-target behavior follows the current director Compose group literally.

confidence: high.

surprises: Full ward exec test hit unrelated TestBuildUpPlanTailnet hostnet expectation failure; focused log/broker tests and ward exec build passed.

follow-ups: Investigate the hostnet test/env mismatch separately if it remains red.

WARD-WORKFLOW: done ✅ <details><summary>details</summary> workflow: merge-remote-main; review summary: skipped in-container review gate because the temporary ward default pending brokered QA intentionally skipped review. summary: Implemented no-target `ward agent logs` compose-group snapshots with per-container headers and a 100-line default; explicit issue-ref and container-name targets stay on the existing single-source path. retrospective: Felt clean after the broker protocol accepted an empty logs target. The only notable surprise was that brokered engineer containers are not Compose services, so the no-target behavior follows the current director Compose group literally. confidence: high. surprises: Full `ward exec test` hit unrelated `TestBuildUpPlanTailnet` hostnet expectation failure; focused log/broker tests and `ward exec build` passed. follow-ups: Investigate the hostnet test/env mismatch separately if it remains red. </details>
Author
Member

WARD-WORKFLOW: blocked 🛑

salvage details

An ephemeral ward container (codex mode) dispatched for this issue finished but its work was not merged to main, so cleanup preserved it on a branch before teardown and reopened the issue (a closing reference for #1567 never reached main). Recover from the salvage branch below.

  • Repo: coilyco-flight-deck/ward
  • Salvage branch: ward-salvage/ward-10e3ad8d
  • Pull request: not opened - salvage branch has no diff against main
  • Reason: missing same-repo closing reference
  • Container uptime at reap: 7m (age of the baked Forgejo PAT snapshot; a long-lived container is likelier to carry a rotated token)

Cleanup diagnostics

--- reap diagnostics ---
ward version:      v0.823.0
version source:    pinned via WARD_VERSION/--ward-version (v0.823.0)
HEAD:              6fa9935bf94d
origin/main:       6fa9935bf94d
ancestry:          HEAD is ALREADY on origin/main - a salvage here is a FALSE salvage (ward#504 signature)
decision gate:     missing same-repo closing reference on already-landed merge-remote-main run
reason:            missing same-repo closing reference
provenance:        present
run-owned landed:  no
working tree:      clean
container uptime:  7m (baked Forgejo PAT age proxy)
--- end reap diagnostics ---

Recover

git fetch https://forgejo.coilysiren.me/coilyco-flight-deck/ward.git ward-salvage/ward-10e3ad8d
git checkout -b ward-salvage/ward-10e3ad8d FETCH_HEAD

This salvage was blocked by a missing closing reference. To recover, amend or cherry-pick the salvaged work so the landing commit message includes closes #1567, or add a small empty trailer commit with closes #1567, then land the branch.

— Codex, via ward agent

WARD-WORKFLOW: blocked 🛑 <details><summary>salvage details</summary> An ephemeral `ward container` (codex mode) dispatched for this issue finished but its work was **not merged to `main`**, so cleanup preserved it on a branch before teardown and reopened the issue (a closing reference for #1567 never reached `main`). Recover from the salvage branch below. - **Repo:** `coilyco-flight-deck/ward` - **Salvage branch:** `ward-salvage/ward-10e3ad8d` - **Pull request:** not opened - salvage branch has no diff against main - **Reason:** missing same-repo closing reference - **Container uptime at reap:** 7m (age of the baked Forgejo PAT snapshot; a long-lived container is likelier to carry a rotated token) ## Cleanup diagnostics ``` --- reap diagnostics --- ward version: v0.823.0 version source: pinned via WARD_VERSION/--ward-version (v0.823.0) HEAD: 6fa9935bf94d origin/main: 6fa9935bf94d ancestry: HEAD is ALREADY on origin/main - a salvage here is a FALSE salvage (ward#504 signature) decision gate: missing same-repo closing reference on already-landed merge-remote-main run reason: missing same-repo closing reference provenance: present run-owned landed: no working tree: clean container uptime: 7m (baked Forgejo PAT age proxy) --- end reap diagnostics --- ``` ## Recover ```bash git fetch https://forgejo.coilysiren.me/coilyco-flight-deck/ward.git ward-salvage/ward-10e3ad8d git checkout -b ward-salvage/ward-10e3ad8d FETCH_HEAD ``` This salvage was blocked by a missing closing reference. To recover, amend or cherry-pick the salvaged work so the landing commit message includes `closes #1567`, or add a small empty trailer commit with `closes #1567`, then land the branch. </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
Author
Member

WARD-WORKFLOW: reservation-released

release details

Run finished with WARD-WORKFLOW: blocked 🛑.

ward container reap released container engineer-codex-ward-1567 (--harness codex): the terminal outcome supersedes the reservation, so a later redispatch no longer needs --override-reservation.

— Codex, via ward agent

<!-- ward-agent-reservation-released --> WARD-WORKFLOW: reservation-released <details><summary>release details</summary> Run finished with `WARD-WORKFLOW: blocked 🛑`. `ward container reap` released container `engineer-codex-ward-1567` (`--harness codex`): the terminal outcome supersedes the reservation, so a later redispatch no longer needs `--override-reservation`. </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
Author
Member

WARD-WORKFLOW: done

details

workflow: merge-remote-main; review summary: skipped in-container review gate because the temporary ward default pending brokered QA intentionally skipped review.

summary: Recovery only. Added empty main commit fba1e6ce with a correctly formatted closes #1567; Forgejo closed the issue at 2026-07-28T08:32:10Z.

retrospective: Felt straightforward: the implementation was already landed, and the only real risk was preserving the recovery scope.

confidence: high.

surprises: aosguard ops forgejo issue view could not resolve its SSM token in this container, so I verified through the public Forgejo API. Post-push Actions showed gate-and-promote success and release success; promote-draft-assets failed, matching adjacent release runs.

follow-ups: None for #1567.

WARD-WORKFLOW: done ✅ <details><summary>details</summary> workflow: merge-remote-main; review summary: skipped in-container review gate because the temporary ward default pending brokered QA intentionally skipped review. summary: Recovery only. Added empty main commit `fba1e6ce` with a correctly formatted `closes #1567`; Forgejo closed the issue at 2026-07-28T08:32:10Z. retrospective: Felt straightforward: the implementation was already landed, and the only real risk was preserving the recovery scope. confidence: high. surprises: `aosguard ops forgejo issue view` could not resolve its SSM token in this container, so I verified through the public Forgejo API. Post-push Actions showed `gate-and-promote` success and `release` success; `promote-draft-assets` failed, matching adjacent release runs. follow-ups: None for #1567. </details>
Author
Member

WARD-WORKFLOW: reservation-released

release details

Run finished with WARD-WORKFLOW: done ✅.

ward container reap released container engineer-codex-ward-1567 (--harness codex): the terminal outcome supersedes the reservation, so a later redispatch no longer needs --override-reservation.

— Codex, via ward agent

<!-- ward-agent-reservation-released --> WARD-WORKFLOW: reservation-released <details><summary>release details</summary> Run finished with `WARD-WORKFLOW: done ✅`. `ward container reap` released container `engineer-codex-ward-1567` (`--harness codex`): the terminal outcome supersedes the reservation, so a later redispatch no longer needs `--override-reservation`. </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
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#1567
No description provided.