Freshen context at launch without races or recursion #6

Closed
opened 2026-07-16 08:01:06 +00:00 by coilyco-ops · 1 comment
Member

Parent

#1

What to build

Add the launch-time path that refreshes a resolved bundle before Ward, warded, Claude, Codex, or Goose starts. Multiple launches must safely share cached inputs while receiving immutable per-resolution outputs. A refresh failure should preserve and identify the last known good bundle.

Acceptance criteria

  • A generic launch command refreshes then execs the real target without wrapper recursion.
  • Ward, warded, Claude, Codex, and Goose entrypoint fixtures exercise the same refresh path.
  • Warm no-change refresh meets a documented sub-250 ms target on the reference host.
  • Concurrent launches for different repos cannot overwrite or cross-mount bundles.
  • Concurrent identical launches converge on one complete cache entry.
  • Refresh failure emits a loud warning and uses a validated last-known-good bundle when available.
  • No bundle failure can corrupt credentials or mutable harness configuration.
  • Infrastructure-facing wrapper installation requirements are documented without embedding rollout code here.

Blocked by

  • Blocked by #5

Execution type

AFK - concurrency, recursion, timing, and failure behavior are executable tests.

## Parent #1 ## What to build Add the launch-time path that refreshes a resolved bundle before Ward, warded, Claude, Codex, or Goose starts. Multiple launches must safely share cached inputs while receiving immutable per-resolution outputs. A refresh failure should preserve and identify the last known good bundle. ## Acceptance criteria - [ ] A generic launch command refreshes then execs the real target without wrapper recursion. - [ ] Ward, warded, Claude, Codex, and Goose entrypoint fixtures exercise the same refresh path. - [ ] Warm no-change refresh meets a documented sub-250 ms target on the reference host. - [ ] Concurrent launches for different repos cannot overwrite or cross-mount bundles. - [ ] Concurrent identical launches converge on one complete cache entry. - [ ] Refresh failure emits a loud warning and uses a validated last-known-good bundle when available. - [ ] No bundle failure can corrupt credentials or mutable harness configuration. - [ ] Infrastructure-facing wrapper installation requirements are documented without embedding rollout code here. ## Blocked by - Blocked by #5 ## Execution type AFK - concurrency, recursion, timing, and failure behavior are executable tests.
Author
Member

Shipped in a75996e.

Acceptance criteria:

  • agent-compose launch --request --layout --target -- ... refreshes (compose + project) then syscall-execs the real command. The AGENT_COMPOSE_LAUNCH sentinel in the child environment stops wrapper recursion - smoke-verified: a nested launch with an intentionally broken request path skipped refresh and exec'd straight through.
  • Entrypoint coverage: the refresh path is exercised across all four layouts (claude, codex, goose, opencode) from the public fixtures. Per the #13 review there are no per-harness entrypoint fixtures beyond the layout registry; Ward/warded consumption is #7.
  • Warm no-change refresh: test-enforced 250ms budget; observed warm path is single-digit milliseconds on this host (bundle cache hit + idempotent projection).
  • Concurrent identical launches converge on one cache entry (8-way goroutine test; materializer rename race + reuse) and Validate passes on the shared target.
  • Concurrent distinct requests stay isolated: distinct cache keys, distinct targets, per-target flock (.agent-compose/lock) serializing projection writes (tested).
  • Refresh failure warns loudly on stderr and launches with the validated last-known-good projection (every sidecar-recorded file present); with no usable prior projection the launch aborts (both tested).
  • Failure write path touches only the bundle cache and projection-owned files - credentials and harness config are never written by refresh, and projection's ownership rule already refuses foreign files.
  • Wrapper installation requirements documented in docs/launch.md without rollout code; binary shadowing stays in infrastructure per the repo boundary.

One criterion amended: 'concurrent launches for different repos' became 'different requests/targets' since repos left the product in #13.

Closed by Claude Code working the issue queue.

Shipped in a75996e. Acceptance criteria: - agent-compose launch --request <kdl> --layout <name> --target <dir> -- <command>... refreshes (compose + project) then syscall-execs the real command. The AGENT_COMPOSE_LAUNCH sentinel in the child environment stops wrapper recursion - smoke-verified: a nested launch with an intentionally broken request path skipped refresh and exec'd straight through. - Entrypoint coverage: the refresh path is exercised across all four layouts (claude, codex, goose, opencode) from the public fixtures. Per the #13 review there are no per-harness entrypoint fixtures beyond the layout registry; Ward/warded consumption is #7. - Warm no-change refresh: test-enforced 250ms budget; observed warm path is single-digit milliseconds on this host (bundle cache hit + idempotent projection). - Concurrent identical launches converge on one cache entry (8-way goroutine test; materializer rename race + reuse) and Validate passes on the shared target. - Concurrent distinct requests stay isolated: distinct cache keys, distinct targets, per-target flock (.agent-compose/lock) serializing projection writes (tested). - Refresh failure warns loudly on stderr and launches with the validated last-known-good projection (every sidecar-recorded file present); with no usable prior projection the launch aborts (both tested). - Failure write path touches only the bundle cache and projection-owned files - credentials and harness config are never written by refresh, and projection's ownership rule already refuses foreign files. - Wrapper installation requirements documented in docs/launch.md without rollout code; binary shadowing stays in infrastructure per the repo boundary. One criterion amended: 'concurrent launches for different repos' became 'different requests/targets' since repos left the product in #13. Closed by Claude Code working the issue queue.
Sign in to join this conversation.
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/agent-compose#6
No description provided.