Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/api/tests/workers/empty-node-warm-handoff.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Empty managed VM nodes reach NodeLifecycle (tasks/active/2026-10-11-reap-empty-managed-vm-nodes.md).
* Empty managed VM nodes reach NodeLifecycle (tasks/archive/2026-10-11-reap-empty-managed-vm-nodes.md).
*
* Production incident 2026-10-09: a healthy pool node ran 34 h with no workspace. Its last
* task was failed by the runaway-cost ceiling, `cleanupTaskRun` only handed a node to
Expand Down
21 changes: 0 additions & 21 deletions tasks/active/2026-10-21-align-tanstack-query.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ UI variants considered: (1) searchable grouped cards with per-setting save/reset
- [x] Run lint/typecheck/tests/build and agent-context budget; review desktop/mobile screenshots and browser error flows.
- [x] Independent Sol specialist/adversarial review; address findings and task-completion review.
- [x] Coordinate bounded staging after wave release; verify real admin route/UI without live production mutation or new OAuth grants.
- [ ] Finish exact-head CI and staging on existing PR #2304; mark ready and request the required best-effort CodeRabbit review.
- [ ] Merge after all gates pass, coordinate the approved production release, and verify its actual SHA, run and relevant smoke test.
- [x] Finish exact-head CI and staging on existing PR #2304; mark ready and request the required best-effort CodeRabbit review. (reconciled 2026-10-26: merged head a0e3fc4b5 passed CI 38979927468, Sonar check 117243346814 and staging 38981626221; PR marked ready 2026-10-16T21:21:33Z; CodeRabbit requested via workflow 38968816796, review 5553993874's four findings fixed in 6f0504b94, zero unresolved threads)
- [x] Merge after all gates pass, coordinate the approved production release, and verify its actual SHA, run and relevant smoke test. (reconciled 2026-10-26: merge 980cef76c, run 38984656469, Worker 85d8c86d at 100%, health and unauthenticated 401 verified by owner task 01M52PEXV56VPD7H8541HP8EFJ. No authenticated production settings smoke ran, and none is required: since Raphaël's 2026-10-17 16:50 UTC rule, production gets basic health/version smoke only)

## Acceptance

Expand Down Expand Up @@ -105,3 +105,17 @@ The remaining unchecked readiness/CodeRabbit and production verification rows ar
### Ready-state CodeRabbit review fixes

The integrated review returned four findings. Fixed the new PATCH integration path to reuse existing provider validation on effective values (including encrypted unchanged companions and reset environment fallbacks) before persistence, retaining revision checks around validation and the atomic commit. Google infrastructure changes, including resets, share the existing atomic credential rotation limit. Added regressions for rejected clients, unchanged companions, reset fallback rejection, 429 limiting and concurrent revisions. Six focused files / 54 tests and API typecheck pass. Independent adversarial security re-review passed; its sole documentation-key correction was fixed and re-reviewed. Three documentation clarity findings are addressed. Exact-head CI/Sonar and incremental review remain required; no live staging requests repeated under another owner’s lease.

## Reconciliation 2026-10-26

- Shipped by #2304 (`980cef76c`, merged 2026-10-16); first successful production deploy:
run 38984656469 (head `980cef76c`, 2026-10-17).
- Unticked: 0. The release box is ticked on the basic production smoke (health, unauthenticated
401). No authenticated production smoke of Admin → Settings ran, and none is required: since
Raphaël's 2026-10-17 16:50 UTC rule, full user flows belong on staging. Owner task
01M52PEXV56VPD7H8541HP8EFJ is still `sleeping`, last error a D1 unique-constraint failure on
`workspaces.chat_session_id` (2026-10-19).
- Verdict: ARCHIVE+FOLLOWUP. UX gaps, including the PATCH cap of 23 changes, are tracked in idea
01M5BRE4WHCKVF0DTAHDVTJDTC; the registry split is tracked in idea 01M5NPWZYJ6XK8G1FK9KXEX813.
- Open PRs: #2366 (`sam/ship-dynamic-admin-settings-hp8efj`) holds only autosaved `.do-state.md`
commits; nothing here depends on it.
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,13 @@ with a default and is not added to `wrangler.toml` (Worker text-binding headroom
sleeping Instant container, no provenance, cleanup backoff, recent warm claim, already warm;
two-sweep escape tests for a failed handoff and an unpersisted `warm_since`
- [x] Proven discriminating (see below)
- [ ] Staging: real VM through the real path, then clean up to zero VMs
- [ ] Production read-only check after deploy
- [x] Staging: real VM through the real path, then clean up to zero VMs (reconciled 2026-10-26:
#2305 body — staging 38950087674 at 9a768e8e7, then 38958057966 at 725f4f0ba; fixture node
01M532XK2ZEXJ50VK2N9ZAKR6Z, workspace DELETE set `warm_since` 19:35:15Z, provider
termination 20:05:57Z after the unchanged 30-min retention; zero owned test VMs remain)
- [x] Production read-only check after deploy (reconciled 2026-10-26: #2305 body — production D1
read 2026-10-16 20:59:59Z found zero running managed workspace VMs with no live workspace
and NULL `warm_since` past the grace; health 200 at 20:59:35Z)

## Discrimination evidence (rule 62)

Expand All @@ -183,18 +188,31 @@ with a default and is not added to `wrangler.toml` (Worker text-binding headroom

## Acceptance criteria

- [ ] A task failed by the runaway ceiling on a pack-placed pool node (no
- [x] A task failed by the runaway ceiling on a pack-placed pool node (no
`auto_provisioned_node_id`) leaves its node warm (`warm_since` set, NodeLifecycle `warm`).
- [ ] A running managed workspace VM with no live workspace, NULL `warm_since`, pool provenance
(reconciled 2026-10-26: Worker test "runaway-cost ceiling on a pack-placed task warms its
node", `apps/api/tests/workers/empty-node-warm-handoff.test.ts:715` on main)
- [x] A running managed workspace VM with no live workspace, NULL `warm_since`, pool provenance
and no task link, idle past the grace, is handed to NodeLifecycle by the cron sweep and is
then torn down by the normal warm timeout + stopped handoff.
- [ ] Nodes with a live workspace, deployment nodes, user-owned nodes and nodes within the grace
are untouched (both D1 and NodeLifecycle state).
- [ ] Each backstop action records a specific structured reason.
- [ ] Warm retention window unchanged.
- [ ] Staging: real VM reaped through the real path; zero staging VMs at the end.
- [ ] Production: no running managed workspace node with 0 live workspaces and NULL
`warm_since` beyond the grace after deploy.
then torn down by the normal warm timeout + stopped handoff. (reconciled 2026-10-26: Worker
test at `empty-node-warm-handoff.test.ts:227` drives sweep → warm → alarm → `stopped` →
provider DELETE → `deleted`)
- [x] Nodes with a live workspace, deployment nodes, user-owned nodes and nodes within the grace
are untouched (both D1 and NodeLifecycle state). (reconciled 2026-10-26: Worker test at
`empty-node-warm-handoff.test.ts:378`; `expectUntouched` at :220 checks the D1 row,
NodeLifecycle state and handoff records)
- [x] Each backstop action records a specific structured reason. (reconciled 2026-10-26: reason
union at `apps/api/src/scheduled/node-cleanup/empty-node-warm-handoff.ts:55`, recorded at
:158/:165/:183/:187; tests assert three of the four reasons at test lines 259/510/538)
- [x] Warm retention window unchanged. (reconciled 2026-10-26: test at
`empty-node-warm-handoff.test.ts:227` asserts alarm = `warmSince` + `NODE_WARM_TIMEOUT_MS`;
staging kept the 30-min window, #2305 body)
- [x] Staging: real VM reaped through the real path; zero staging VMs at the end. (reconciled
2026-10-26: #2305 body — delete handoff 19:35:15Z, provider termination 20:05:57Z, D1 node
DELETED; "Zero owned test VMs remain")
- [x] Production: no running managed workspace node with 0 live workspaces and NULL
`warm_since` beyond the grace after deploy. (reconciled 2026-10-26: #2305 body — read-only
production D1 query at 2026-10-16 20:59:59Z returned zero)

## References

Expand Down Expand Up @@ -268,3 +286,13 @@ checks. Its coverage run passed 12,395 tests with one unrelated 15-second capaci
fixture timeout; no timeout or gate was weakened. The new retention change requires a new
complete exact-head CI run. Staging authentication with the managed smoke credential works
when normal Origin/User-Agent headers are supplied; no credential change was needed.

## Reconciliation 2026-10-26

- Shipped by #2305 (`51a0acc90`, merged 2026-10-16); first successful production deploy:
run 38963983049 (head `51a0acc90`, 2026-10-16).
- Unticked: 0 — none.
- Verdict: ARCHIVE. Staging and read-only production evidence is in the #2305 body; owner task
01M52PF30AYFJN0YM8KPQ8ME45 completed.
- Open PRs: none. Recovery branch `sam/ship-empty-vm-cleanup-q8me45` (`725f4f0ba`) is fully
merged.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ Full revised report is in SAM conversation 997b298c-547e-4502-ac69-69d965ec475b,
- [x] Leave existing active/legacy sessions untouched and report legacy/stale state honestly; no forced restarts/recreation.
- [x] Add scenario tests for auth negatives, selected/nonselected/default env, user/cwd/live uncommitted file, quoting/multiline, errors/redaction/cancel/idempotency and fresh/legacy compatibility.
- [x] Update tool descriptions, API/public docs and environment references as applicable.
- [ ] Run lint/typecheck/test/build and required security/quality checks.
- [ ] Complete local specialist reviews (Go/security/API/env/docs/constitution/test/task completion), fix findings.
- [ ] Draft PR then ready only after gates; request CodeRabbit and wait; resolve arrived findings.
- [ ] Staging real VM, heartbeat/access and fresh-session sentinel verification; bounded cleanup.
- [ ] Merge normal gates, monitor exact production deployment; verify fresh-session behavior with synthetic sentinels and report deployed commit/results.
- [x] Run lint/typecheck/test/build and required security/quality checks. (reconciled 2026-10-26: #2332 body records full root lint/typecheck/test/build pass; PR CI run 38518266782 success on head `a39cde757` incl. Secret Scan; main CI 38520625396 success on `faaf861ba`)
- [x] Complete local specialist reviews (Go/security/API/env/docs/constitution/test/task completion), fix findings. (reconciled 2026-10-26: #2332 Specialist Review Evidence table — Go, security, API/docs/env/constitution/test ADDRESSED; task-completion-validator PASS)
- [x] Draft PR then ready only after gates; request CodeRabbit and wait; resolve arrived findings. (reconciled 2026-10-26: #2332 timeline — ready_for_review 2026-10-13 21:58 UTC, then coderabbit-review label; CodeRabbit CHANGES_REQUESTED 22:07 addressed in `d4d3df016`; review 5513724172 APPROVED head `a39cde757`)
- [x] Staging real VM, heartbeat/access and fresh-session sentinel verification; bounded cleanup. (reconciled 2026-10-26: #2332 body — staging run 38468953890 success at `6065b7c42`; 16/16 sentinel checks on fresh VM; replacement node deleted via owner API, zero active staging nodes)
- [x] Merge normal gates, monitor exact production deployment; verify fresh-session behavior with synthetic sentinels and report deployed commit/results. (reconciled 2026-10-26: merged as `faaf861ba`; production run 38522169513 success; #2332 comment 2026-10-14 07:08 UTC records 16/16 fresh production synthetic checks and deployed commit)

## Acceptance

Expand Down Expand Up @@ -66,3 +66,11 @@ Staging deployment `38468953890` at API commit `6065b7c42` passed. Its VM agent
Added explicit synthetic-only regressions: `TestEmptyInjectionDoesNotPrintInheritedEnvironment` requires an empty-injection `true` command to emit no stdout/stderr (the bare-export failure); `TestOrdinaryEnvironmentListingContainsOnlyManagedPlaceholders` runs an ordinary env-listing child with an explicitly synthetic environment and verifies only the protected placeholder survives. Minimal env-i focused Go regressions pass; independent security reviewer PASS. No test output includes real environment values; failure assertions report only status/byte counts.

Production deployment/verification, final CI/review evidence reconciliation and CodeRabbit request/wait remain pending. Credential rotation is not a release blocker per user; no credential or security-policy changes are authorized by this evidence.

## Reconciliation 2026-10-26

- Shipped by #2332 (`faaf861ba`, merged 2026-10-14); first successful production deploy:
run 38522169513 (head `faaf861ba`, 2026-10-14).
- Unticked: 0 — none.
- Verdict: ARCHIVE. Merged, deployed and production-verified with 16/16 synthetic sentinels;
nothing material left.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ Signed GitHub ingress ACKs asynchronously; handler permanently claims ID before
- [x] Real SQLite integration tests for retries/races/crashes and additive migration fresh/upgrade paths.
- [x] Update docs/config references, run lint/typecheck/test/build and relevant quality checks.
- [x] Local independent specialist reviews incl task-completion/security/Cloudflare/test/config/docs.
- [ ] Coordinate and verify pinned staging using synthetic fixtures, cleanup.
- [ ] PR exact SHA CI/Sonar/security and best-effort CodeRabbit evidence reported BEFORE merge.
- [ ] Wait for coordinator merge clearance; then merge/deploy/readonly production migration/health/config verification.
- [x] Coordinate and verify pinned staging using synthetic fixtures, cleanup. (reconciled 2026-10-26: #2335 body — staging runs 38553413721 and 38555135543 success on final head `81d193b79`; signed same-ID sends 200, one completed intake, payload erased; slot released 11:16 UTC, zero active staging nodes)
- [x] PR exact SHA CI/Sonar/security and best-effort CodeRabbit evidence reported BEFORE merge. (reconciled 2026-10-26: #2335 comments 2026-10-14 11:16 and 11:26 UTC, before 11:35 merge — CI 38551778475 success on `81d193b79`, Sonar check 115818498598 pass, CodeRabbit review 5516635152 findings fixed and threads resolved)
- [x] Wait for coordinator merge clearance; then merge/deploy/readonly production migration/health/config verification. (reconciled 2026-10-26: #2335 comment 2026-10-14 12:16 UTC — merged after coordinator clearance as `a6866fafa`; production run 38559400967 success; migration 0195 applied to sam-prod; `/health` 200; recovery overrides unset, defaults apply)

## Release constraints

Expand All @@ -49,3 +49,12 @@ No real external user event replay. No production synthetic canary without exist

- Migration test now uses the established SQL asset import pattern, executes migrations and asserts database behavior; no scanner exception.
- Read-only staging observability baseline passed persisted D1 noise checks; Workers telemetry unavailable with403, no credential expansion. Staging hold awaits Pulumi preview completion/explicit coordinator release.

## Reconciliation 2026-10-26

- Shipped by #2335 (`a6866fafa`, merged 2026-10-14); first successful production deploy:
run 38559400967 (head `a6866fafa`, 2026-10-14). Production acceptance was also recorded in
output-branch commit `b59915553`, which never landed on `main`.
- Unticked: 0 — none.
- Verdict: ARCHIVE. Audit item 1 is shipped and production-verified; out-of-scope audit items
2-4 stay in SAM draft `01M4TBZJTKH78R14RQNNKC837N`, which still lists item 1 as open.
Loading
Loading