Expose complete run artifacts and broker-stage friction #1551

Closed
opened 2026-07-24 21:33:53 +00:00 by coilyco-ops · 3 comments
Member

Problem

The completed smoke run for ward#1543 was drained and reaped, but ward agent logs coilyco-flight-deck/ward#1543 still selected docker logs because the exited container remained in docker ps -a. That returned only the four-line engineer console and hid the drained WARD-RUN-SUMMARY, meta.json.friction, transcript view, and broker wrapper artifact.

The literal friction report exists today as optional meta.json.friction, but ward agent logs cannot request it. Its collector also sees only the container console and recognizes four teardown cases: missing transcript, prelaunch failure, preserved extra-repo work, and salvage noise. It cannot represent broker-stage facts such as a stale config ref, generated mount degradation, or a failed image pull followed by successful cache fallback.

Change

  • Add an explicit completed-run artifact selector to ward agent logs. Support at least console, transcript, meta, friction, and dispatch, while preserving current console output as the default.
  • For an exited run with a completed archive, prefer the drained archive over raw docker logs so the run summary footer is visible. Keep live Docker output preferred for a running container.
  • Let an issue ref select the redacted broker dispatch artifact even when a live or exited engineer container also matches.
  • Make friction print a schema-versioned, secret-free JSON report with run correlation dimensions plus deterministic events.
  • Join deterministic broker-stage friction into that report. Cover stale config-ref resolution, generated mount degradation, recovered image-pull fallback, and terminal launch failure without classifying every stderr line as fatal.
  • Preserve the raw versus redacted authorization boundary. A brokered read-only director receives only redacted artifacts.
  • Document the artifact contract and update docs/FEATURES.md.

Acceptance

  • A completed run can be read by issue ref without removing its exited Docker container first.
  • ward agent logs coilyco-flight-deck/ward#1543 --artifact meta returns the drained secret-free metadata when available.
  • --artifact friction returns explicit empty events for a clean run and classified events for broker-stage recovered or fatal fixtures.
  • --artifact dispatch returns the matching redacted wrapper artifact rather than the engineer console.
  • Existing callers without --artifact retain compatible behavior apart from preferring the completed archive for exited runs.
  • Tests cover live, exited-but-drained, dispatch-plus-container, no-friction, recovered-fallback, and fatal-launch cases.
  • Ward validation and pre-commit pass.
  • ward#1546 removes the obsolete generated mount dependency.
  • ward#1550 investigates the distinct image distribution fallback.
## Problem The completed smoke run for [ward#1543](https://forgejo.coilysiren.me/coilyco-flight-deck/ward/issues/1543) was drained and reaped, but `ward agent logs coilyco-flight-deck/ward#1543` still selected `docker logs` because the exited container remained in `docker ps -a`. That returned only the four-line engineer console and hid the drained `WARD-RUN-SUMMARY`, `meta.json.friction`, transcript view, and broker wrapper artifact. The literal friction report exists today as optional `meta.json.friction`, but `ward agent logs` cannot request it. Its collector also sees only the container console and recognizes four teardown cases: missing transcript, prelaunch failure, preserved extra-repo work, and salvage noise. It cannot represent broker-stage facts such as a stale config ref, generated mount degradation, or a failed image pull followed by successful cache fallback. ## Change * Add an explicit completed-run artifact selector to `ward agent logs`. Support at least `console`, `transcript`, `meta`, `friction`, and `dispatch`, while preserving current console output as the default. * For an exited run with a completed archive, prefer the drained archive over raw `docker logs` so the run summary footer is visible. Keep live Docker output preferred for a running container. * Let an issue ref select the redacted broker dispatch artifact even when a live or exited engineer container also matches. * Make `friction` print a schema-versioned, secret-free JSON report with run correlation dimensions plus deterministic events. * Join deterministic broker-stage friction into that report. Cover stale config-ref resolution, generated mount degradation, recovered image-pull fallback, and terminal launch failure without classifying every stderr line as fatal. * Preserve the raw versus redacted authorization boundary. A brokered read-only director receives only redacted artifacts. * Document the artifact contract and update `docs/FEATURES.md`. ## Acceptance * A completed run can be read by issue ref without removing its exited Docker container first. * `ward agent logs coilyco-flight-deck/ward#1543 --artifact meta` returns the drained secret-free metadata when available. * `--artifact friction` returns explicit empty events for a clean run and classified events for broker-stage recovered or fatal fixtures. * `--artifact dispatch` returns the matching redacted wrapper artifact rather than the engineer console. * Existing callers without `--artifact` retain compatible behavior apart from preferring the completed archive for exited runs. * Tests cover live, exited-but-drained, dispatch-plus-container, no-friction, recovered-fallback, and fatal-launch cases. * Ward validation and pre-commit pass. ## Related * [ward#1546](https://forgejo.coilysiren.me/coilyco-flight-deck/ward/issues/1546) removes the obsolete generated mount dependency. * [ward#1550](https://forgejo.coilysiren.me/coilyco-flight-deck/ward/issues/1550) investigates the distinct image distribution fallback.
Author
Member

Exact ward#1543 regression evidence

The newly drained redacted archive confirms the report is internally contradictory:

  • Summary: normalized_outcome=pr-green, high confidence, transcript present, outcome comment present, checks green. Runtime was about 13m12s.
  • Top-level launched is omitted/false even though the reaper console explicitly records launched=true.
  • friction[] therefore emits one false high-severity prelaunch-failure with fingerprint reap/prelaunch/container-never-launched.
  • Its evidence is a quoted dispatch-failed enum/comment line that Codex printed while reading Ward source, not a lifecycle event. Generic console substring matching crossed into source content.
  • The redacted console contains 72 reference is not a tree lines and 9 generated-mount degradation warnings from the stale config path, plus 2 sandbox-unavailable notices and 2 missing optional-home-path chown messages. The run nevertheless reached a green PR.
  • The Codex transcript has 55 tool outputs. The only structurally nonzero outputs are 7 exit-status-128 results associated with the stale config resolution path.
  • transcript_present=true, but no transcript.redacted.jsonl was produced for this Codex run, so the read-only archive cannot inspect transcript errors separately from the very large console.

Please make this fixture load-bearing: derive launched state from a durable lifecycle fact, never classify source/prompt text as lifecycle evidence, classify the repeated config failures as recovered friction, and ensure a Codex redacted transcript or equivalent safe error summary is addressable through the new artifact selector.

## Exact ward#1543 regression evidence The newly drained redacted archive confirms the report is internally contradictory: * Summary: `normalized_outcome=pr-green`, high confidence, transcript present, outcome comment present, checks green. Runtime was about 13m12s. * Top-level `launched` is omitted/false even though the reaper console explicitly records `launched=true`. * `friction[]` therefore emits one false high-severity `prelaunch-failure` with fingerprint `reap/prelaunch/container-never-launched`. * Its evidence is a quoted `dispatch-failed` enum/comment line that Codex printed while reading Ward source, not a lifecycle event. Generic console substring matching crossed into source content. * The redacted console contains 72 `reference is not a tree` lines and 9 generated-mount degradation warnings from the stale config path, plus 2 sandbox-unavailable notices and 2 missing optional-home-path `chown` messages. The run nevertheless reached a green PR. * The Codex transcript has 55 tool outputs. The only structurally nonzero outputs are 7 exit-status-128 results associated with the stale config resolution path. * `transcript_present=true`, but no `transcript.redacted.jsonl` was produced for this Codex run, so the read-only archive cannot inspect transcript errors separately from the very large console. Please make this fixture load-bearing: derive launched state from a durable lifecycle fact, never classify source/prompt text as lifecycle evidence, classify the repeated config failures as recovered friction, and ensure a Codex redacted transcript or equivalent safe error summary is addressable through the new artifact selector.
Author
Member

WARD-WORKFLOW: done

details

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

Implemented ward agent logs --artifact for console, transcript, meta, friction, and dispatch; completed archives now beat exited Docker logs, dispatch selects the redacted broker wrapper, friction reports emit schema-v1 JSON with explicit events, and broker-stage recovered/fatal friction is classified deterministically. Felt straightforward after the source-text false-positive was pinned to lifecycle evidence; confidence high. Surprise: generated FEATURES.md size caps forced the detailed contract into agent-logs.md. Follow-up: none from this run.

WARD-WORKFLOW: done ✅ <details><summary>details</summary> workflow: merge-remote-main; review summary: skipped - in-container review gate intentionally skipped because the temporary ward default pending brokered QA. Implemented `ward agent logs --artifact` for console, transcript, meta, friction, and dispatch; completed archives now beat exited Docker logs, dispatch selects the redacted broker wrapper, friction reports emit schema-v1 JSON with explicit events, and broker-stage recovered/fatal friction is classified deterministically. Felt straightforward after the source-text false-positive was pinned to lifecycle evidence; confidence high. Surprise: generated `FEATURES.md` size caps forced the detailed contract into `agent-logs.md`. Follow-up: none from this run. </details>
Author
Member

WARD-WORKFLOW: reservation-released

release details

Run finished with WARD-WORKFLOW: done ✅.

ward container reap released container engineer-codex-ward-1551 (--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-1551` (`--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#1551
No description provided.