Inject pre-flight launch logs into the launched agent context #1407

Merged
coilyco-ops merged 3 commits from issue-1335 into main 2026-07-15 12:05:22 +00:00
Member

This adds a launch-only preflight artifact to the seed given to launched agents. The host-side broker log stays on stderr, while the launched container now starts with a structured launch preflight block that includes the resolved run context and the preflight read.

  • Adds a launch preflight seed block that carries the resolved context and reservation state.
  • Leaves the existing host/audit seed dump alone.
  • Adds focused tests for the reservation seed render and launch preflight seed context.

Tests:

  • go test ./cmd/ward -run 'TestReservationSeedContextRender|TestLaunchPreflightSeedContext|TestRunPreflightGooseNeverRunsHostOneShot|TestBuildReservationSeedContextPartition|TestAgentSeedPromptWorkflow|TestReviewGateClauseInSeed|TestDockerCreateArgvSeedsAgentArgs'
  • golangci-lint run ./cmd/ward

closes #1335
ward.workflow: pull-request-and-merge

This adds a launch-only preflight artifact to the seed given to launched agents. The host-side broker log stays on stderr, while the launched container now starts with a structured launch preflight block that includes the resolved run context and the preflight read. - Adds a launch preflight seed block that carries the resolved context and reservation state. - Leaves the existing host/audit seed dump alone. - Adds focused tests for the reservation seed render and launch preflight seed context. Tests: - `go test ./cmd/ward -run 'TestReservationSeedContextRender|TestLaunchPreflightSeedContext|TestRunPreflightGooseNeverRunsHostOneShot|TestBuildReservationSeedContextPartition|TestAgentSeedPromptWorkflow|TestReviewGateClauseInSeed|TestDockerCreateArgvSeedsAgentArgs'` - `golangci-lint run ./cmd/ward` closes #1335 ward.workflow: pull-request-and-merge
Inject launch pre-flight context into agent seed
Some checks failed
test / test (pull_request) Failing after 13m4s
443bec19b9
Retry CI after transient failure
Some checks failed
test / test (pull_request) Failing after 10m3s
44504ae999
Author
Member

QA BLOCK: do not merge this PR yet for #1335.

Inspection of head 44504ae999 found that the launched-agent pre-flight seed block reports reservation re-check: passed before that result is actually known. The block is composed in launchAgentContainer before reserveIssue runs the remote reservation re-check, and --skip-preflight explicitly skips that re-check while the seed still says it passed.

That misses #1335's requirement that the launched artifact show what was checked and whether relevant gates passed, deferred, or refused. I filed follow-up #1417 with identical headless/P2 milestone queueing and attempted dispatch; dispatch is currently capacity-blocked at 3 active engineers. Merge #1407 only after #1417 or an equivalent update makes the reservation re-check status truthful.

QA BLOCK: do not merge this PR yet for #1335. Inspection of head 44504ae999f768185d2e02d6d8772e62e3ea28ea found that the launched-agent pre-flight seed block reports `reservation re-check: passed` before that result is actually known. The block is composed in `launchAgentContainer` before `reserveIssue` runs the remote reservation re-check, and `--skip-preflight` explicitly skips that re-check while the seed still says it passed. That misses #1335's requirement that the launched artifact show what was checked and whether relevant gates passed, deferred, or refused. I filed follow-up #1417 with identical headless/P2 milestone queueing and attempted dispatch; dispatch is currently capacity-blocked at 3 active engineers. Merge #1407 only after #1417 or an equivalent update makes the reservation re-check status truthful.
Retry CI after runner-side cancellation
All checks were successful
test / test (pull_request) Successful in 54s
f7de5c4c87
Author
Member

QA BLOCK persists on updated head f7de5c4c87.

I re-inspected the current PR diff after the CI retry commit. The launch pre-flight seed still renders reservation re-check: passed unconditionally in launchPreflightSeedContext, and the seed is still composed before reserveIssue runs the actual remote reservation re-check. The skipped path also remains inaccurate because --skip-preflight skips the re-check while the seed says passed.

Focused local tests still pass, but they pin the inaccurate string rather than correcting it. #1417 remains the captured follow-up and is dispatch-deferred due repo capacity. Keep #1407 unmerged even if run 8527 turns green unless #1417 or equivalent changes land on this branch first.

QA BLOCK persists on updated head f7de5c4c878889304c720d1ea75639ce859dbcc0. I re-inspected the current PR diff after the CI retry commit. The launch pre-flight seed still renders `reservation re-check: passed` unconditionally in `launchPreflightSeedContext`, and the seed is still composed before `reserveIssue` runs the actual remote reservation re-check. The skipped path also remains inaccurate because `--skip-preflight` skips the re-check while the seed says passed. Focused local tests still pass, but they pin the inaccurate string rather than correcting it. #1417 remains the captured follow-up and is dispatch-deferred due repo capacity. Keep #1407 unmerged even if run 8527 turns green unless #1417 or equivalent changes land on this branch first.
Sign in to join this conversation.
No description provided.