Ensure engineer residual work can land instead of salvaging for missing close trailers #993

Closed
opened 2026-07-10 09:31:40 +00:00 by coilyco-ops · 11 comments
Owner

Problem

During the infrastructure#520 first-run acceptance loop, one engineer run produced residual work and the reaper preserved it on ward-salvage/infrastructure-b6103c7a instead of landing it.

The observed run happened to use the Goose harness, but this issue is harness-neutral. Do not implement this as a harness-name branch such as if harness == goose. The same close-trailer and residual-landing contract should apply through the shared agent/reaper path.

Evidence from infrastructure#523 on 2026-07-10 UTC:

  • Reaper status: WARD-REAP: reopened
  • Reason: missing same-repo closing reference
  • HEAD: a0060d9d88a1
  • origin/main: 6a8b1787722a
  • Working tree at reap time: Makefile, README.md, scripts/launch-ward-eval.sh, scripts/test-ward-eval.sh, scripts/ward-eval-executable.sh
  • The run log showed the model claimed the issue was complete, then reaper created a residual commit without a same-repo closing reference.

The backstop correctly avoided a false close, but the first-run flow still degrades: model work that should be landed becomes salvage, the issue remains open, and the director needs a human or another run to recover it.

Do

  • Inspect why the engineer reached reaper with dirty residual work instead of an intentional commit containing closes #523.
  • Fix the shared seed prompt, harness wrapper contract, or reaper path so same-repo issue work has a deterministic way to commit with a valid close trailer before teardown.
  • If the reaper creates a residual commit, make the failure message clearly distinguish agent did not commit from commit existed but lacked close trailer.
  • Do not weaken the safety gate: Ward must still refuse to close or land work that cannot be tied to the same repo issue.

Acceptance

  • A test or broker-level fixture covers an engineer run that modifies files and should land same-repo work.
  • The normal successful path produces a commit message with closes #N or equivalent same-repo trailer before reaper landing.
  • Residual dirty work without a close trailer still fails closed, but the diagnostics name the missing agent commit or close-trailer cause precisely.
  • A repeat of the infrastructure#523 shape would either land with a valid close trailer or produce a clearer failure without implying the issue was complete.
  • The implementation is harness-neutral and does not special-case one harness by name.
  • ward exec test passes, or the issue comment names the exact failing check.

Decision for headless carry

Kai confirmed the title and implementation prompt must stay harness-neutral so engineers do not hardcode incorrect harness switches.

Related: coilyco-flight-deck/infrastructure#520, coilyco-flight-deck/infrastructure#523, and coilyco-flight-deck/ward#990.

## Problem During the infrastructure#520 first-run acceptance loop, one engineer run produced residual work and the reaper preserved it on `ward-salvage/infrastructure-b6103c7a` instead of landing it. The observed run happened to use the Goose harness, but this issue is harness-neutral. Do not implement this as a harness-name branch such as `if harness == goose`. The same close-trailer and residual-landing contract should apply through the shared agent/reaper path. Evidence from infrastructure#523 on 2026-07-10 UTC: * Reaper status: `WARD-REAP: reopened` * Reason: `missing same-repo closing reference` * HEAD: `a0060d9d88a1` * origin/main: `6a8b1787722a` * Working tree at reap time: `Makefile`, `README.md`, `scripts/launch-ward-eval.sh`, `scripts/test-ward-eval.sh`, `scripts/ward-eval-executable.sh` * The run log showed the model claimed the issue was complete, then reaper created a residual commit without a same-repo closing reference. The backstop correctly avoided a false close, but the first-run flow still degrades: model work that should be landed becomes salvage, the issue remains open, and the director needs a human or another run to recover it. ## Do * Inspect why the engineer reached reaper with dirty residual work instead of an intentional commit containing `closes #523`. * Fix the shared seed prompt, harness wrapper contract, or reaper path so same-repo issue work has a deterministic way to commit with a valid close trailer before teardown. * If the reaper creates a residual commit, make the failure message clearly distinguish `agent did not commit` from `commit existed but lacked close trailer`. * Do not weaken the safety gate: Ward must still refuse to close or land work that cannot be tied to the same repo issue. ## Acceptance * A test or broker-level fixture covers an engineer run that modifies files and should land same-repo work. * The normal successful path produces a commit message with `closes #N` or equivalent same-repo trailer before reaper landing. * Residual dirty work without a close trailer still fails closed, but the diagnostics name the missing agent commit or close-trailer cause precisely. * A repeat of the infrastructure#523 shape would either land with a valid close trailer or produce a clearer failure without implying the issue was complete. * The implementation is harness-neutral and does not special-case one harness by name. * `ward exec test` passes, or the issue comment names the exact failing check. ## Decision for headless carry Kai confirmed the title and implementation prompt must stay harness-neutral so engineers do not hardcode incorrect harness switches. Related: coilyco-flight-deck/infrastructure#520, coilyco-flight-deck/infrastructure#523, and coilyco-flight-deck/ward#990.
Author
Owner

ward exec test still fails in this container. cmd/ward/setup_test.go and cmd/ward/smartdefaults_test.go report that WARD_CONFIG_REF stays at the baked neutral default instead of pointing at the coilyco bundle for coilyco-flight-deck/ward. Action: investigate ward exec config-source bootstrap so repo verbs see the coilyco bundle.

ward exec test still fails in this container. cmd/ward/setup_test.go and cmd/ward/smartdefaults_test.go report that WARD_CONFIG_REF stays at the baked neutral default instead of pointing at the coilyco bundle for coilyco-flight-deck/ward. Action: investigate ward exec config-source bootstrap so repo verbs see the coilyco bundle.
Author
Owner

WARDED_WORKFLOW: failed

details

workflow: pull-request-and-merge; review summary: skipped (temporary ward default pending brokered QA)

The Goose residual close-trailer path is fixed and the focused cmd/ward tests pass, but the repo-wide ward exec test gate still fails in this container on the pre-existing config-source and capability baseline: TestCapabilityGuardfilesExist, TestEngineerContainerLimitBelowAndAtLimit, TestBacklogRefreshReservationStates, TestSweepStaleContainerAssets, TestSweepStaleLaunchEnvFiles, TestOverrideForgejoCreateIssueAddsQuietFlag, TestForgejoGraftInventory, TestOverrideForgejoViewIssueSwapsLeaf, TestRunSetupWithUnsetRef, TestSmartDefaultsBaked, TestMountWardKdlExecMountsNewSurfaces.

Retrospective: the Goose fix felt straightforward once the wrong salvage gates were isolated. The blocker is external to this patch. Confidence: medium. Follow-up: fix the bundle/config-source baseline so ward exec test can turn green.

WARDED_WORKFLOW: failed ❌ <details><summary>details</summary> workflow: pull-request-and-merge; review summary: skipped (temporary ward default pending brokered QA) The Goose residual close-trailer path is fixed and the focused `cmd/ward` tests pass, but the repo-wide `ward exec test` gate still fails in this container on the pre-existing config-source and capability baseline: `TestCapabilityGuardfilesExist`, `TestEngineerContainerLimitBelowAndAtLimit`, `TestBacklogRefreshReservationStates`, `TestSweepStaleContainerAssets`, `TestSweepStaleLaunchEnvFiles`, `TestOverrideForgejoCreateIssueAddsQuietFlag`, `TestForgejoGraftInventory`, `TestOverrideForgejoViewIssueSwapsLeaf`, `TestRunSetupWithUnsetRef`, `TestSmartDefaultsBaked`, `TestMountWardKdlExecMountsNewSurfaces`. Retrospective: the Goose fix felt straightforward once the wrong salvage gates were isolated. The blocker is external to this patch. Confidence: medium. Follow-up: fix the bundle/config-source baseline so `ward exec test` can turn green. </details>
coilyco-ops changed title from Ensure Goose engineer residual work can land instead of salvaging for missing close trailers to Ensure engineer residual work can land instead of salvaging for missing close trailers 2026-07-15 06:51:26 +00:00
Author
Owner

WARD-TRIAGE: warded control plane coherence milestone

This issue is part of the warded control plane coherence sprint. The release thesis is to make warded feel like one dependable control plane for agent work: higher safe parallelism, coherent config defaults, reliable broker/container behavior, human-feedback gates, and enough structured evidence for the next actor after a paused or failed run.

For this sprint, headless means an engineer should be able to carry the issue from current issue context to a merged change without new human decisions. If the issue discovers a missing decision, split or demote the unclear part instead of guessing.

WARD-TRIAGE: warded control plane coherence milestone This issue is part of the `warded control plane coherence` sprint. The release thesis is to make `warded` feel like one dependable control plane for agent work: higher safe parallelism, coherent config defaults, reliable broker/container behavior, human-feedback gates, and enough structured evidence for the next actor after a paused or failed run. For this sprint, `headless` means an engineer should be able to carry the issue from current issue context to a merged change without new human decisions. If the issue discovers a missing decision, split or demote the unclear part instead of guessing.
Author
Owner

WARDED_WORKFLOW: failed

details

workflow: pull-request-and-merge; launch failed before start

A v0.767.0 dispatch from the read-only director surface acquired the reservation and created engineer-codex-ward-993, but the container never started. The surface's host dispatch broker is unreachable, and direct Docker seeding from inside this director does not produce a runnable engineer container. No branch or PR was created. The inert container was removed and this surface's disposable local reservation cache was cleared, so a healthy broker can redispatch #993.

WARDED_WORKFLOW: failed ❌ <details><summary>details</summary> workflow: pull-request-and-merge; launch failed before start A v0.767.0 dispatch from the read-only director surface acquired the reservation and created `engineer-codex-ward-993`, but the container never started. The surface's host dispatch broker is unreachable, and direct Docker seeding from inside this director does not produce a runnable engineer container. No branch or PR was created. The inert container was removed and this surface's disposable local reservation cache was cleared, so a healthy broker can redispatch #993. </details>
Author
Owner

WARDED_WORKFLOW: blocked 🛑

details

manual close/update snapshot at 2026-07-23T04:39:41Z is newer than the latest ward acknowledgement at 2026-07-23T04:34:26Z

This action is blocked until the feedback is visibly acknowledged.

— Codex, via ward agent

WARDED_WORKFLOW: blocked 🛑 <details><summary>details</summary> manual close/update snapshot at 2026-07-23T04:39:41Z is newer than the latest ward acknowledgement at 2026-07-23T04:34:26Z This action is blocked until the feedback is visibly acknowledged. </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
Author
Owner

WARDED_WORKFLOW: #1517

details

review summary: skipped (temporary ward default pending brokered QA)
workflow: pull-request-and-merge; review summary: skipped (temporary ward default pending brokered QA)

Acknowledged the PR synchronization after excluding the unrelated legacy role catalog; CI is green and the guarded merge is next.

Retrospective: the repair felt narrow and evidence-led once the residual capture was separated from agent-authored commits. Confidence: high. Surprises: the recovered branch carried an unrelated role-catalog artifact, which was excluded. Follow-up: none.

WARDED_WORKFLOW: https://forgejo.coilysiren.me/coilyco-flight-deck/ward/pulls/1517 <details><summary>details</summary> review summary: skipped (temporary ward default pending brokered QA) workflow: pull-request-and-merge; review summary: skipped (temporary ward default pending brokered QA) Acknowledged the PR synchronization after excluding the unrelated legacy role catalog; CI is green and the guarded merge is next. Retrospective: the repair felt narrow and evidence-led once the residual capture was separated from agent-authored commits. Confidence: high. Surprises: the recovered branch carried an unrelated role-catalog artifact, which was excluded. Follow-up: none. <!-- ward-agent-signature --> </details>
Author
Owner

Merge retry pending: Forgejo returned HTTP 405 “Please try again later” after five guarded settle attempts, while test / test (pull_request) remains green on ee77ebe3f7e0. Ward will retry the head-pinned merge; no branch change is needed.

Merge retry pending: Forgejo returned HTTP 405 “Please try again later” after five guarded settle attempts, while `test / test (pull_request)` remains green on `ee77ebe3f7e0`. Ward will retry the head-pinned merge; no branch change is needed. <!-- ward-agent-signature -->
Author
Owner

WARDED_WORKFLOW: blocked 🛑

details

human comment by @coilyco-ops at 2026-07-23T04:42:44Z is newer than the latest ward acknowledgement at 2026-07-23T04:42:19Z

This action is blocked until the feedback is visibly acknowledged.

— Codex, via ward agent

WARDED_WORKFLOW: blocked 🛑 <details><summary>details</summary> human comment by @coilyco-ops at 2026-07-23T04:42:44Z is newer than the latest ward acknowledgement at 2026-07-23T04:42:19Z This action is blocked until the feedback is visibly acknowledged. </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
Author
Owner

CI retry: test / test (pull_request) failed only in TestRunHostDispatchBrokerRequestReportsLaterLaunchFailureThroughArtifact, whose expected dispatch-summary line was absent. ward exec test and 20 focused local repetitions pass on the same head; retrying through the documented push fallback because this Forgejo exposes no rerun API.

CI retry: `test / test (pull_request)` failed only in `TestRunHostDispatchBrokerRequestReportsLaterLaunchFailureThroughArtifact`, whose expected dispatch-summary line was absent. `ward exec test` and 20 focused local repetitions pass on the same head; retrying through the documented push fallback because this Forgejo exposes no rerun API. <!-- ward-agent-signature -->
Author
Owner

WARDED_WORKFLOW: #1517

details

review summary: skipped (temporary ward default pending brokered QA)
workflow: pull-request-and-merge; review summary: skipped (temporary ward default pending brokered QA)

Latest PR head is green and mergeable. Retrospective: the residual proof split felt clean; the broker test now awaits its terminal artifact instead of racing it. Confidence: high. Surprises: Forgejo lacked a rerun endpoint and main moved during the run. Follow-up: none.

WARDED_WORKFLOW: https://forgejo.coilysiren.me/coilyco-flight-deck/ward/pulls/1517 <details><summary>details</summary> review summary: skipped (temporary ward default pending brokered QA) workflow: pull-request-and-merge; review summary: skipped (temporary ward default pending brokered QA) Latest PR head is green and mergeable. Retrospective: the residual proof split felt clean; the broker test now awaits its terminal artifact instead of racing it. Confidence: high. Surprises: Forgejo lacked a rerun endpoint and main moved during the run. Follow-up: none. <!-- ward-agent-signature --> </details>
Author
Owner

WARDED_WORKFLOW: reservation-released

release details

Run finished with WARDED_WORKFLOW: https://forgejo.coilysiren.me/coilyco-flight-deck/ward/pulls/1517.

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

Outcome summary: #1517

— Codex, via ward agent

<!-- ward-agent-reservation-released --> WARDED_WORKFLOW: reservation-released <details><summary>release details</summary> Run finished with `WARDED_WORKFLOW: https://forgejo.coilysiren.me/coilyco-flight-deck/ward/pulls/1517`. `ward container reap` released container `engineer-codex-ward-993` (`--harness codex`): the terminal outcome supersedes the reservation, so a later redispatch no longer needs `--override-reservation`. **Outcome summary:** https://forgejo.coilysiren.me/coilyco-flight-deck/ward/pulls/1517 </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
Commenting is not possible because the repository is archived.
No project
No assignees
1 participant
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#993
No description provided.