Repository navigation
feat(execution): run the fleet on ECS - #439
Conversation
Astra reviewReviewed StandardsNo merge-blocking method or YAGNI findings. Spec1. [P1] Intent: an incomplete ECS listing permanently loses a live task
One omitted running task makes Local reproduction with the actual ECS provider, controller and Postgres: omit one task from one listing, then restore normal responses. After three further housekeeping passes, Postgres counted 2 active tasks, ECS returned 3 RUNNING tasks, and 0 StopTask calls had occurred. The forgotten row remained #406 requires: "The controller owns every exec task." Preserve and reconcile known ARNs; an omitted listing or transient 2. [P2] Intent: spare sizing excludes most of Fargate's cold start
The local reproduction supplied a task created 30 seconds before readiness and RUNNING for 1 second. The stored cold-start average was 1,008 ms, versus 30,009 ms pending-to-ready. At one company wake per second, that sizes the pool at 2 spares rather than about 30, causing avoidable cold waits under sustained arrivals despite available fleet budget. #384 §5 requires Verification
Standards: 0 blockers. Spec: 2 blockers, worst P1: a live task permanently escapes reconciliation and the fleet budget. |
Opus reviewReviewed 1. The new Image CI job fails on this head, so the build has not been shown to reproduce in CI
2. Distinct workerd uids fail open, even though the docs state them as factThe image ends with 3. The AWS account id and Neon project id are now in a public repo
4. The spike writes a long-lived IAM user key into a task definition, so the task-role path was never tested
5. The ECS provider has no offline test and no seam for one
6.
|
Review dispositions and role-only acceptanceRead the conversation comments, review bodies and inline review comments. Astra and Opus posted the findings below; no additional Grok finding appeared in the inspected feedback. Fixed
Security and conservative behavior
Verification
IAM blocker resolved by live acceptanceFull role-only acceptance and teardown on #406 records every Done-when case. The image ran runtime commit
The run is torn down. Independent checks found zero tasks, services, targets and run image tags; both run databases and all ten published object keys are absent. ALB, target-group and security-group settings match the pre-run snapshots. Host/exec definitions |
9dcfcc5 to
6923ee5
Compare
c48dbe5 to
80afe08
Compare
Patches can share tables, but could not read another patch's file store. This adds read-only access to shared stores on tiers 1 and 2, with live source authorization and recovery after reshare or restore. Includes shared-store discovery and declarations, CLI add/remove, generated SDK support, local fixtures, and documentation. Query subscriptions track source files and lifecycle changes; fixture reloads invalidate subscriptions even when the last file is removed. Stacked on `tier2/406-fleet-ecs` in #439. This PR intentionally targets that branch and contains only the shared-store change. Closes #407. Implements the shared-store requirements in #384, using the agreed UI from #385. ## Verification - `pnpm test`: 134 files and 1,500 tests passed. - `pnpm typecheck` and `pnpm lint` passed. - Chromium verified both tiers, downloads, fresh URL authorization, rollback, served-tier gating, lifecycle recovery, and subscription invalidation/recovery. - Real CLI and dev flows verified add/remove and empty-fixture reloads. - Standards and spec reviews completed with no unresolved findings. Implemented with GPT-6 Astra using the omp harness.
The docs pass was written while #406's role-only acceptance waited on the IAM grant. That run passed on 2026-09-30 and #439 merged, so the "pending" claims contradicted ADR-0012's own measurements section. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The docs pass was written while #406's role-only acceptance waited on the IAM grant. That run passed on 2026-09-30 and #439 merged, so the "pending" claims contradicted ADR-0012's own measurements section. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The fleet controller only had a local task provider, so production servers could not admit tier 2 patches.
This adds the ECS provider, private management and callback listeners, and rollout fencing with deployment-secret overlap and retirement. A reproducible host/exec image and guarded spike deploy script cover deployment and teardown. Documentation records the measured behavior rather than promising unchanged sibling latency on half a vCPU.
Stacked on
tier2/405-fleet-controller. This PR targets that branch, notmain.Closes #406.
Verification
c48dbe5: Node 22/24 tests, lint, CLI smoke, Clerk live, Postgres concurrency, dependency review, image and label. CI, image.pnpm typecheckandpnpm lintpassed. Focused execution suites: 5 files and 66 tests passed, including 20 new ECS provider/controller regressions.Role-only deployment and cleanup
The operator granted the existing host role its documented fleet policy and rotated the deployer's key, deleting the old key. The acceptance reloaded those credentials. Host and control tasks verified temporary credentials for
patchy-tier2-spike-host-task, without static AWS keys. Exec tasks had no task role. The earlier IAM authorization blocker is resolved.The two loaded CPU windows returned 50/50 healthy replies each, but p95 increased from 999 to 1189 ms and from 768 to 938 ms. Four distinct process reports recorded
stall. These are client-observed measurements, not an unchanged-sibling-speed guarantee. The original acceptance record retains the earlier unexplained non-200 response rather than retroactively classifying it.The run was torn down. Independent checks found zero tasks, services, targets and run image tags; both run databases and all ten published objects are absent. ALB, target-group and security-group settings match their pre-run snapshots. Run task definitions are deregistered and pending deletion. Pre-existing spike infrastructure, the operator-installed role policy and CloudWatch evidence remain.
The old credential-bearing revisions remain deregistered. Git history was not rewritten. The agent made no IAM policy/key changes and did not touch production.
Implemented with
openai-codex/gpt-6-astrathrough the omp harness.