Repository navigation
L19: guided-setup teardown marks D1 first and resumes cleanup - #2858
Conversation
…iter; scan its DO DDL Moves the DO-SQLite DDL and row types into credential-setup-session/schema.ts and the D1 status writer into d1-status.ts, with no behaviour change. schema.ts is added to quality:do-migration-safety, which never scanned this DO (its dynamic D1 UPDATE false-positives the scanner). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nterrupted cleanup Ported from sam/selfhost-pass-2 (C14, landing slice L19), Cloudflare-relevant parts only. - Teardown claims the terminal status, records cleanup_pending (with the pre-claim status) and arms a recovery alarm synchronously, then marks D1 terminal before any sandbox I/O, so an isolate death never leaves the create route's one-active lookup returning a dead session. - cleanup.ts: scrub (skipped from provisioning or on a resumed run, and bounded by the exec timeout), destroy, release, D1 repair only while D1 is active, clear marker+alarm. - The alarm resumes a terminal row with cleanup_pending = 1, joins a cleanup already running in this isolate, and gives up after DEFAULT_SETUP_SESSION_MAX_CLEANUP_RECOVERY_ATTEMPTS. - The SDK's own permanent container start failure maps to sandbox_runtime_unavailable. - Additive DO columns via PRAGMA + literal guarded ALTER TABLE in schema.ts (scanned). Left out as self-host only: SandboxDO subclass, sandbox-startup-errors.ts, the container monitor tee/poll, and the settleSharedFlight join bound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
…r ignores comments Review fixes for L19: - Register the post-claim teardown run as this isolate's cleanup before its first await, so a recovery alarm that fires during the claim-time D1 write joins it instead of starting a second destroy and release. - A resumed cleanup scrubs again: on Cloudflare the Sandbox container outlives the DO isolate that died. Only teardown from provisioning skips the scrub. - check-do-migration-safety: tokenize once and skip comments. Per-quote-style regexes paired delimiters across the whole file, so an apostrophe in a comment hid a later single-quoted DROP TABLE. Existing files: 65 more SQL lines scanned, all pass. - Tests for the claim guard, claim-time alarm, device-auth delete, saving, TTL expiry, legacy terminal rows; deterministic join test. Each proven red with its guard removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@coderabbitai review |
Action not completed
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f77d0aa1e1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c4a86225c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f79208e874
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a96e76cf59
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9391e0eb0d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e75718ce0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: abeebb142c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec457f645e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|



Summary
L19 (idea
01M72M9AEB933ZY8269D376DKC) fixes dead guided logins blocking fresh attempts and holding sandbox/pool resources after isolate death. Cancellation during provisioning could also start a sandbox merely to scrub it. Existing PR resumed; main includes #2841 (0c672ddbf).Candidate
6a069c057adds only the reviewed task archive/evidence checkpoint to staged implementation230d64574. Runtime code is byte-for-byte unchanged. Main4fc4cb99a(#2840) andecb58a6d5(#2788) were merged without conflicts; requested merge history preserved. Implementation CI44189930037and E2E44189930159succeeded (24 pass/10 inapplicable skips), with Sonar zero issues/hotspots. Staging and release passed below. Final archive-head CI remains required.Implemented on the existing branch:
sandbox_runtime_unavailablewith installed-SDK contract coverage.index.ts791 lines after extracting SDK lifecycle helpers. Guarded nullable ALTERs scanned; no wrangler tag. TypeScript AST SQL extraction closes quote/comment/regex blind spots.Budget: Operations
credentialSetup.cleanupRecoveryStepTimeoutMs: default 5,000 ms, range 1–10,000, capped by interactive timeout. Inline keeps 30s default. Recovery alone pays a bounded cached settings read shared by both policy values; four remote waits total 20s default/40s maximum per attempt, default three/maximum ten attempts (110s default/500s maximum remote waits including up to two successful-phase continuation passes and a final bounded D1/pool assessment). No new remote settings reads per start or widened sweep selection. SDK tracking adds two local SQL counter writes per original chain: at most three polling chains/six counter writes per poll (about 1,800 over the default 15-minute TTL at 3-second polls), plus finite provisioning, verification and scrub chains. Terminal+cleanup-owed candidates exit by completion/quarantine. Pool release and D1 repair use the same recovery deadline.Additional teardown safeguards:
cleanup_scrub_staterecords needed/uncertain/successfully-scrubbed work. An outer deadline never proves SDK cancellation. Issued but unsettled work prevents destruction, proof, pool release and cleanup completion; original settlement is registered withwaitUntil.Self-host-only SandboxDO/celld/monitor/
settleSharedFlightcode stays out of Worker imports.Validation
Sonar follow-up: its green gate still exposed four open PR issues. Named cleanup/scanner helpers, explicit skip reasons and typed membership resolve the reported complexity/readability findings without changing matching or teardown behavior. API82/82, scanner15/15, TypeScript/lint and independent narrow review pass; scanner output matches48fixtures and5repository files exactly. The next analysis also reported four minor RegExp.exec suggestions, now fixed with exact scanner-output parity. Actual Sonar API for abeebb1: zero open issues and zero hotspots. Any next pushed head still requires refreshed analysis.
Latest review fixes: pending-only alarms no longer burn retries before the interactive SDK timeout. D1 repair precedes deferral, and pending state is re-read after that await so settlement cannot lose its prompt wake. Scrub success requires both SDK
success=trueand exit code zero; failed scrubs remain retryable. Regressions cover six pending ticks, expiry grace/watchdog, invalid clocks, held D1 repair and all three failed-result forms.Latest additional review fixes: the alarm verifies a durable next wake for nonquarantined pending cleanup and throws when missing/unknown, retaining Cloudflare native bounded retries. Destruction has one caller-owned deadline and tracks the original SDK promise beyond timeout; original success durably records proof before settlement and further cleanup. Failed proof persistence retains uncertainty. Typed retry policy is snapshotted on first recovery, preserving legacy budgets and preventing override changes from reviving quarantine.
Latest finalization fixes: resumed provisioning always scrubs unless successful scrub/destruction is proven; counter settlement alone cannot exclude a background login driver. Late successful scrub/destruction each grant one durable completion credit, consumed before the next work attempt and never through quarantine. Initial cancellation requires durable arming before the terminal claim, with a fresh saving-state check after that await; arming failure leaves active D1 sweep eligibility.
Final D1 follow-up: successful original destruction also grants one bounded completion credit. For proven-destroyed sessions, successful D1/pool reconciliation clears cleanup before the failure-budget gate; failed bookkeeping consumes the existing bounded attempt/credit budget. This avoids false abandonment when the final D1 repair succeeds, without reopening quarantine or issuing another SDK call.
Staging Verification (REQUIRED for all code changes — merge-blocking)
Staging Verification Evidence
PASS on implementation
230d64574: normal gated staging2 deploy 44202361573 succeeded, including rollout and smoke tests. Both queues and main were checked, reserve-only came first, and the actual queue turn was honored. Installation test user via workload identity.L19 INSTANT VERIFIEDin the live UI (session9b0bb068-9b77-4996-844c-ee0484f5d9f5).01M7NZJJZ86KEMHXHF762A5MTB: real OpenAI verification URL/code visible on desktop/mobile, native copy matched. Cancel200/dialog closed in1536ms, immediate stateGETcancelled. D1cancelled/completed00:05:58.585Z; DOcleanup_pending0/destroyed1/io_pending0; poolheld0. Direct D1 read followed cancellation; ordering is independently proven by real-SQL barrier tests.01M7NZM94ZYBS48702DFVGC1PXPOST201/provisioning, real Preparing secure sign-in UI. Cancel200/dialog closed626ms, no hang/reload, stateGETcancelled. D1cancelled/completed00:06:44.280Z; DOcleanup_pending0/destroyed1/io_pending0; poolheld0. Raw Cloudflare log00:06:44.521Z:credential_setup.scrub_skipped, exact session ID, reasonprovisioning_still_in_flight, request0b1b323bc5999c1862733748b3c3c33a. SDK permanent-start mapping is contract-covered as agreed; no throwaway image or provider sign-in completion.Screenshots were opened and inspected at1280x800/375x667; no UI component changes. Terminal audit rows are retained by normal lifecycle, with no direct D1 writes/deletes.
Merge hold lifted: coordinator event
be50db76at 21:31Z confirms production deploy44174587033succeeded atecb58a6d5, including #2841. Remaining merge gates still apply. Before normal merge, refresh main/gates and post a channel merging claim; if another slice claimed merging within ten minutes, wait for its SHA. Post the merge SHA immediately after and update the idea; coordinator monitors production.UI Compliance Checklist (Required for UI changes)
N/A: no web/shared UI components changed. Setting uses existing generic Operations surface.
End-to-End Verification (Required for multi-component changes)
Data Flow Trace
POST /api/agent-credential-setup-sessions/:id/cancel→ route/service → DOcancel/teardown(index.ts) → durable initial alarm → terminal claim/marker → D1 terminal (d1-status.ts) →runSetupSessionCleanup(cleanup.ts): scrub, destroy/proof, pool, active-only D1 repair, clear marker/alarm. Alarms join/resume under cap. Terminal D1 admits fresh attempts. Pending SDK work defers destructive cleanup; observed settlement re-arms recovery within the existing cap.Untested Gaps
Real-SQLite restart/barrier tests simulate isolate death; real eviction cannot reliably be forced. Live agreed checks passed; unknown SDK settlement intentionally remains quarantined.
Post-Mortem (Required for bug fix PRs)
What broke
Dead logins blocked fresh attempts and orphaned sandbox/pool cleanup.
Root cause
Teardown wrote D1 after fallible sandbox awaits; cleanup progress lived only in memory.
Class of bug
Lifecycle mirror ordering and incomplete durable finalization across async boundaries.
Why it wasn't caught
Immediate sandbox mocks/fake SQL hid interruption; this DO's DDL was excluded from migration scanning.
Process fix included in this PR
Real-SQLite restart/barrier regressions; scanner now includes
schema.tsand parses TypeScript to prevent quote/comment/regex blind spots.Post-mortem file
tasks/archive/2026-11-17-l19-credential-setup-teardown-robustness.md; archived after independent completion validation and live cleanup/release.Specialist Review Evidence (Required for agent-authored PRs)
Original evidence retained:
Continuation test/completion/public-doc review PASS. Latest pending-work watchdog and successful-scrub delta: independent Cloudflare/security/constitution review PASS; pre-fix red proofs and 69 teardown cases pass. CI/staging still required.
CodeRabbit Review Evidence (Required for agent-authored PRs)
2026-11-17: ready/label 11:08:28Z; trusted run
44071284214requested 11:09:59Z; reply 11:10:07Z: “Action not completed: Review rate limited.” Earlier automatic draft attempt 10:41Z: “Review limit reached.” Later automatic reviews skipped. Rule 25 ends wait on rate limit; no repeated trigger/waiver. Reconcile any later actual review before merge.Exceptions (If any)
index.tsexisting size exception: 791 lines; schema, D1, cleanup and SDK lifecycle helpers are extracted. Shared SQLite test harness has documented exception.Agent Preflight (Required)
Classification
External References
Installed
@cloudflare/sandbox0.12.10 permanent-start/error-response implementation; port sourcesam/selfhost-pass-2(30c1b18, f074327, a5bce06, acf865e).Codebase Impact Analysis
apps/api/src/durable-objects/credential-setup-session/owns terminalization, SDK flight tracking and recovery;apps/api/src/services/credential-setup-config.ts,sandbox.tsandadmin-settings-credential-setup-definitions.tsown timeouts and settings.scripts/quality/check-do-migration-safety.tsscans the extracted schema; tests live inapps/api/tests/andscripts/quality/. Public docs live inapps/www/src/content/docs/docs/guides/. Other D1 writers:apps/api/src/scheduled/setup-session-sweep.ts(expired/swept) andapps/api/src/routes/agent-credential-setup-sessions.tsstart-failure fallback; active-only repair preserves their terminal writes.Documentation & Specs
Public
guides/agents.md: unavailable sign-in.guides/admin-settings.md: recovery budget/range and timeout limits. No new environment variable/secret.Constitution & Risk Check
X/XI: Cloudflare-only port, named defaults/admin settings. Rules 31/45/47: scanned additive DDL, flight join, bounded recovery. Durable uncertainty and overlap tracking cover all cancellable SDK calls; recovery remote waits have dedicated bounds.
Final completion review (2026-11-18): A/B/C/E/F PASS, D N/A (no UI changes), independent read-only validator verified121tests, liveInstant/Q1/Q2 and cleanup/tombstone evidence. Release confirmed. Archive checkpoint committed; final-head CI and serialized normal merge remain explicit gates.
Final main reconciliation
Final archived head
6a069c0578a36e219f645e05005e5b6881af3c3dpassed full CI 44206830795, including all Workers shards and aggregates, with no pending or failed checks. Final review-thread reconciliation found no unresolved threads. Before merge, main advanced to472dc9684(#2876), a Claude GitHub Action dependency update only. Clean-merged into this existing branch asa52f595bf956240c4aa4d0424a787bafc6e55625. Application, packages and scripts remain byte-identical to the successful staged candidate230d64574; no new specialist area or live scenario changed. Secret-readback guard rerun: 0 findings. Waiting for this newest head’s CI before normal merge.Latest main reconciliation: Insights #2838
Clean-merged main
5e3f31f7finto the existing branch as1a389ae0a9946c112d6b935e6d4b24a56e77f0da. Normalized zero-context diff proves the L19 additions/deletions are identical before and after this main-only merge. Auto-merged admin setting names are separate union members; both Insights and guided-login sections in the merged admin-settings and agents guides were read and are present and coherent. Dependency/API build and focused teardown/native/recovery suites pass: 121/121; secret-readback guard: 0 findings.Staging proof on
230d64574122eb7e654ca938e88ff54c602c2427; carried over to1a389ae0a9946c112d6b935e6d4b24a56e77f0daafter main-only merge, coordinator-approved (coordinator task01M7JMXS2JRW6QQMB1356ENPM3, verified messageafd80269-d5c1-4ebc-9657-67f0086b051f). Fresh full CI, including admin-settings registry tests, remains required on the new head before serialized normal merge. No new live resources or source changes were introduced.Late review delta: bounded alarm join (in validation)
Codex r4608153962 identified an unbounded alarm join of request-owned cleanup when its claim-time D1 write or inline pool release stalls. Two regression cases failed against the pre-fix implementation. The alarm now joins only for the existing recovery step budget, preserves the original single cleanup owner, and schedules the immutable uncertainty watchdog; settlement wakes unresolved recovery sooner. A permanent stall quarantines once without duplicate sandbox work. Fresh Cloudflare/security delta review PASS and test/completion delta review ADDRESSED/PASS; final isolated focused suite 125/125 PASS, API build/lint/secret guard PASS; merge is blocked until they pass, affected checks and newest-head CI pass, and staging applicability is reconciled. Prior live checks/cleanup/release remain recorded; this delta is not yet claimed as live verified.
Join budget and terminal schedule: one alarm joins one existing cleanup owner for at most
credentialSetup.cleanupRecoveryStepTimeoutMs(5 seconds default, 1–10,000 ms configured, capped bySANDBOX_EXEC_TIMEOUT_MS), plus the existing bounded settings read (5 seconds on a cold override-cache read). A timed-out join does not run another cleanup or spend an attempt. It schedulesmax(expires_at, completed_at + SANDBOX_EXEC_TIMEOUT_MS + capture_poll_ms); with default 15-minute session TTL, 30-second sandbox timeout and 3-second poll, the scheduled terminal watchdog is at mostmax(remaining session TTL, 33 seconds)after the terminal claim. A permanently blocked owner quarantines at that watchdog delivery, retaining cleanup evidence and an alert; cleanup success cannot be guaranteed for a permanently hung dependency. Actual alarm delivery adds Cloudflare scheduling latency. An observed settlement schedules recovery sooner at one capture-poll interval (3 seconds default). For one blocked owner, this adds one bounded join delivery, one watchdog delivery if still blocked, and at most one settlement wake; it does not poll the same blocked RPC repeatedly.Fresh staging required for this delta: coordinator decision
45b7779f-2a05-4ca6-8d3d-eb09186c0ecdsupersedes carry-over for the alarm-join code change. After final-head CI, repeat Instant/Q1/Q2 on a normal gated staging turn, verify elapsed cleanup and no residual watchdog/quarantine, then clean up/release. Fault injection into live managed D1/pool is not required; the discriminating real-SQLite fault tests are accepted. Reserve-only staging2 run44222215811requested; no new test resources created.Current final candidate after Sonar and main reconciliation
Head
33c935f1d269a4057e08d9b03f90c3adf6cf63daincludes the reviewed alarm-join fix. Sonar S6582 reported a minor null-check style issue on7aae7018e; fixed by the equivalent optional-chain expression in9f1265371(4 targeted fault/race/watchdog tests and API build pass). Main advanced after the serialized normal merge of #2859 asb7502ba96; clean-merged with no conflicts. Normalized zero-context diff confirms L19 feature additions/deletions are unchanged by that upstream merge. New head requires its own full CI and the previously recorded mandatory fresh Instant/Q1/Q2 staging run; no prior-head success is substituted. Focused combined-head tests 125/125 PASS, API build and secret-readback guard PASS; reserve-only staging2 slot and turn wake remain active. No new live fixtures/resources exist.Unrelated main test correction required by CI
Current head
5dcaa9ba28862311375f02727f6aeaafd27a28c1. API shard 1 on33c935f1dfailed one unrelated test after main #2859:stuck-task-slept-session-liveness.test.tsexpected the public health fetch budget to remain exactly 5,000 ms, while route resolution correctly consumed 1 ms and passed 4,999 ms. The shard otherwise passed 368 files / 5,463 tests. This minimal fix freezesDate.now()only for that zero-elapsed-time test and restores it infinally; the exact 5,000 ms, URL/options, and live ACP verdict assertions remain. 50/50 file tests, lint/format, independent test review PASS. No runtime code changes; the full 125-test L19 proof remains applicable. This is explicitly an unrelated upstream test correction, as authorized in the task. Fresh CI and final-head staging remain required; a prior-head result is not substituted.Current-head CI gate passed (2026-11-18 04:02 UTC)
Head
5dcaa9ba28862311375f02727f6aeaafd27a28c1passed full CI 44228397699, including all API and Worker shards and required aggregates. Current rollup: zero pending, zero failed. E2E 44228397538, PR evidence and secret scan pass; Sonar reports zero open issues and zero hotspots. The unrelated upstream timing-test correction passes in CI. Fresh final-head staging remains required. The earlier reservation expired while CI was pending; both queues were reread and a new staging2 reserve-only run 44234559439 was requested behind the current holder. No new live resources have been created.Pre-deploy main reconciliation (2026-11-18 04:19 UTC)
Before deploying on our verified early staging2 turn, the required fetch found main
88b6103e1(#2879), which changes only an unrelated task archive. Clean normal merge into the existing branch produced7bd730cf91dae2af706344a5124e3d1e567d46f6; application, packages and scripts are byte-identical to full-CI-green5dcaa9ba2. No specialist area changed. New-head CI must pass before the required fresh live verification; no new deployment, lease or live fixtures have been created.Unrelated upstream diagnosis test correction (current head)
Current head
d3a92c32bf8aece37fe8957b5935999d213fd1ad. Worker shard 5 on7bd730cf9failed one of 347 tests: the existing diagnosis cancellation/model-await test expected one model fetch but saw zero. CI logs recorded a native workerd alarm firing during setup;DiagnosisRunner.start()schedules an immediate alarm before the fixture installs its gateway/model boundary. The two tests that manually drive this race now use a Date-only clock 60 seconds ahead of native time, restored inafterEach, so native delivery cannot consume their tick before setup completes. Real timers and every alarm/model/terminal SQL assertion remain. Focused Worker file 7/7 PASS, lint/format/diff and independent test review PASS. This is an unrelated main test-only correction authorized by task step 3; no runtime change. New-head CI and fresh final-head staging remain required.Current candidate with L15 main merge (2026-11-18 05:15 UTC)
d3a92c32bpassed full CI 44239324764, including the corrected diagnosis Worker test and every required aggregate, and E2E 44239324944. Main then advanced to01ff1fc8d(#2857, L15), including Instant quick-start UI used by the planned live checks. Clean normal merge into this existing branch produced current headec457f645eb925a5a21bb4c8acee4aa5073794bb; L19 teardown source and diagnosis test fix remain identical. The shared upstream health-budget test correction is already identical on main. After merge: 125/125 focused L19 tests, API build, secret-readback guard and diff check PASS. The merged agents guide retains both L15 quick-start and guided-login documentation. New-head CI and fresh final-head staging remain required. The previous reservation expired without any deployment/lease/live fixtures; reserve-only will precede the next gated staging deployment.Latest candidate: SDK tracking excludes D1 bookkeeping
Current head
7a6f03df4aa09f22f769b61132e2e6f8a8bfdd75fixes Codex r4609508523, now resolved with implementation evidence. Provisioning settles the original SDK chain before its admitting D1 write. Inventory found the same issue during code submission and capture: the exchanging D1 write is now outside its SDK flight, and capture uses separate existence/read flights around the capturing D1 write. A fresh lifecycle guard prevents any later SDK read after cancellation. Saving behavior is unchanged.All three real-SQLite held-D1 cases were RED before the fix (outstanding SDK counter 1 instead of 0). They now prove cancellation completes scrub/destruction/pool release while D1 is still blocked; late D1 writes remain terminal, issue no SDK read, and two later ticks do not repeat destruction. 127/127 focused tests, API build, lint, format, secret-readback guard, independent CF/security and test/completion/documentation review PASS. The capture split adds at most two local counter writes per poll with an existing file; maximum 3 chains/6 writes per poll (~1,800 over default TTL/poll interval), with no additional SDK or D1 call. Index remains 793 lines. New-head CI and fresh final-head Instant/Q1/Q2 plus cleanup timing/no-quarantine checks remain mandatory before normal merge. No new live resources or lease have been created.
Latest Sonar callback correction
Current head
acd5a397f84676fa8f5d7cc7fa4a7317100347aaremoves an unnecessary async wrapper from the guarded capture read (Sonartypescript:S7503). The callback still registers its tracked flight before checking the terminal state and returns the original SDK promise only when active. No lifecycle semantics changed. The three held-D1 barrier tests, API build, lint, format and diff checks pass; the prior full 127-test proof and affected specialist reviews remain applicable. New-head CI and fresh final-head staging remain required.Current candidate with L13 main merge (2026-11-18 06:00 UTC)
Main advanced to
d29015f35(#2839, L13 monthly ceiling and metering) before the fresh staging reservation. Clean normal merge produced current head1b38dc4506f245ec8fc2937177afd1ae7d3ed2abon the existing branch. The L19 teardown source and scanner remain identical toacd5a397f; no conflict or specialist-area delta. After merge: 127/127 focused tests, API build, secret-readback guard and diff check PASS. Latest review reconciliation found no unresolved threads. New-head full CI and the required fresh final-head live checks remain pending; no new staging lease or fixtures exist.Final-head CI green; repeat staging reserved (2026-11-18 06:25 UTC)
Current head
1b38dc4506f245ec8fc2937177afd1ae7d3ed2abpassed full CI 44248121772 and E2E 44248121847, including all API/Worker shards and required aggregates. Current rollup has zero pending or failed checks; direct Sonar queries report zero open issues and zero hotspots. Maind29015f35remains included. All affected specialist reviews are PASS/ADDRESSED.Reserve-only staging2 44250766171 succeeded. Authoritative queue status at 06:24:48 UTC places this task first, waiting behind the current holder, with turn 07:45:32–07:55:32 UTC. A turn wake and early-release notification request are registered. No repeat deployment or live resources have been created. Fresh final-head Instant reply, Q1/Q2, cleanup elapsed time and no residual cleanup/quarantine proof remain mandatory before normal merge; historical prior-head live evidence is not substituted.
Pre-deploy account-linking main reconciliation (2026-11-18 06:52 UTC)
The staging2 holder released early via 44253611859, and authoritative queue status confirms our turn through 07:55:32 UTC. The pre-deploy fetch found main
ca03b8167(#2830, secure account linking); clean normal merge into this existing branch produced current head42a04f7f545ecc9686f059a44d3da181e81f18ee. L19 teardown/config/scanner remain byte-identical to the prior green head; the shared settings files only add upstream account-linking registration, with no conflict or changed L19 specialist area. 127/127 focused L19 tests, API dependency build, secret-readback guard and diff check PASS after merge. New full CI 44254393422 and E2E 44254393458 must complete before the required fresh live checks. No repeat deployment, authentication or live resources have been created.Main L16 reconciliation before deployment (2026-11-18 07:26 UTC)
Head
42a04f7f5passed full CI 44254393422, all required API/Worker aggregates and E2E 44254393458; direct Sonar queries show zero issues/hotspots. The pre-deploy fetch found main0669773a9(#2856, L16 hosted-git). Clean normal merge into the existing branch produced current head29badc8b6e3a301a95471c20e62ab88ec6b9481b; L19 teardown/config/scanner remain unchanged, with no conflict or new L19 reviewer area. New-head local checks and CI are running. Our staging2 queued turn remains active through 07:55:32 UTC. No repeat deployment/authentication/live resources exist; final-head live checks remain required before normal merge.Post-merge
29badc8b6checks: 127/127 focused L19 tests, API dependency build, secret-readback guard and diff check PASS. Current full CI 44258728061 and E2E 44258727954 are running; exact-head event subscription and the existing staging-turn fallback wake are active.Final-head gates passed; normal staging deployment started (2026-11-18 07:46 UTC)
Current
29badc8b6e3a301a95471c20e62ab88ec6b9481bpassed full CI 44258728061, all API/Worker shards and required aggregates, and E2E 44258727954. Direct Sonar queries show zero open issues/hotspots. Fresh main fetch confirms0669773a9remains included. Both staging queues were checked and staging2 confirms our reserved turn. Normal gated staging2 deployment 44261504272 was dispatched with a bounded 30-minute lease. Fresh live checks and owned-resource cleanup/release remain required; deployment dispatch alone is not live evidence.Fresh final-head staging evidence (2026-11-18 08:22 UTC)
Normal staging2 44261504272 SUCCESS on exact
29badc8b6, including configuration, safety gates, Cloudflare deployment, container rollout, health and smoke checks. Verified own lease.L19 INSTANT VERIFIED, visible in the live chat. Dismissed the installation’s onboarding overlay through its normal UI before inspecting the unobscured screenshot.01M7PVTNW0ZE0T2DGWYP8SE6Z2showed the realauth.openai.comverification link and 10-character code. Native copy and desktop/mobile screenshots passed. Cancel returned 200; dialog closed in 2,286 ms, immediate GET returned cancelled. D1completed_at=2026-11-18T08:19:44.423Z; first direct CF observation completed 6,888 ms after clicking Cancel and found DOcleanup_pending=0, SDK I/O 0, destruction proof 1, attempts 0, scrub success 2, error NULL and pool held 0. Stable follow-up at 106 seconds.01M7PVX1QFE4EZQQHYRE8QTBVA, immediately accepted POST 201 in provisioning with no reset/cooldown. Live “Preparing secure sign-in” → Cancel 200 → closed dialog in 674 ms, immediate GET cancelled. D1 completed at08:20:53.138Z. Raw CF log at 08:20:53.379Z recordscredential_setup.scrub_skipped, exact session ID, reasonprovisioning_still_in_flight, request4608595bb1ce8ce348953d7d2b93f323, staging2 Worker/cancel RPC.storage.getAlarm()is not exposed by the read-only SQL API; disarming is covered by the real-SQLite alarm tests and the successful cleanup path. The SDK permanent-start mapping remains covered by its contract test, as agreed.01M7PVP37R9G3HWF0PHG62H8Q6, profile and workspace deleted through normal APIs; own GETs 404. Direct D1 confirms project/profile/workspace counts 0 and the owned node is a deleted tombstone with provider instance NULL. No provider login was completed and no credential saved. Final stable observation, sign-out and normal lease release are being completed before merge.All screenshots above were opened and inspected. Timestamped D1/DO/pool snapshots and raw log evidence are retained in
.tmp/l19-repeat-*; historical prior-head evidence remains separate.Final cleanup at 08:23 UTC: sign-out 200, private browser-state file removed and absence verified. Second direct CF observation remained settled for 176.558 seconds (Q1) and 110.944 seconds (Q2) without new attempts, pending work or retained pool leases. Normal release 44266532245 is queued; release success and next-task notification remain before merge. Fresh pre-merge checks: no unresolved review threads, Sonar zero issues/hotspots, main
0669773a9included and PR mergeable with clean status. Coordinator’s production #2841 merge hold is lifted (eventbe50db76-357a-4f17-8d19-46f82048d6ec).Post-staging main reconciliation (2026-11-18 08:36 UTC)
Normal release 44266532245 SUCCESS; direct staging2 status shows holder NULL and the next queued task was notified. Sign-out and owned-resource cleanup are complete.
The final fetch found new main
1e7d3ba6b(#2691, owner force-resume). Clean normal merge produced current head655a142cefc91604b6cc6b83bc8bc0ac6d336940on the existing branch. Upstream changes 168 files; only two overlap L19’s 22 files, adding separate Orchestrator settings imports/types/registration. L19’s implementation/config/tests/scanner are unchanged. The entire feature patch, normalized only to omit index hashes and hunk line coordinates, has identical before/after SHA-25602cb7d091ad064418f30e05ba695c46e6fef8fc00a4ee520d51368a72be39b3d.Actual live-tested head remains
29badc8b6, deployment 44261504272. Carry-over to655a142ceis requested, not yet accepted: coordinator decision and independent Cloudflare/security carry review are pending, along with new-head full CI/local checks. No claim is made that655a142cewas deployed. These gates must pass before normal merge.Post-merge
655a142celocal checks 127/127 focused tests, API dependency build, secret-readback guard and diff check PASS. New full CI 44268225712 and E2E 44268225869 are running. Coordinator carry decision and independent carry review remain pending.Independent Cloudflare/security carry review PASS: complete normalized feature hash independently matched; guided-setup DO/helpers/config/settings definitions, pool, Sandbox SDK service, route/entry/Wrangler/lock are unchanged. Shared overlaps add distinct pure
orchestrator.*metadata with no settings collision or initialization side effect. Upstream task-recovery index, task-cancellation paths and ensure memo changes were inspected; no additional L19 live case is indicated. This does not claim the merged Worker was deployed and does not waive new-head CI or coordinator acceptance, which remain pending.Coordinator-approved staging carry: conditions and registry proof
Coordinator task
01M7JMXS2JRW6QQMB1356ENPM3explicitly ACCEPTED29badc8b6→655a142cecarry in verified event55c2580f-4da3-4d5f-818f-fb8aa492e957, conditional on current-head CI/E2E/local checks, independent CF review, base-registry proof, explicit evidence/timeout budgets, and serialized merge with a fresh main check. No new staging fixtures are required.Independent CF/security carry review PASS and local 127/127 tests, build, secret guard and diff PASS. Existing committed
credential-setup-recovery-config.test.tsalready exercises both recovery settings’ defaults, persisted overrides and validation through the real resolver with no extension installation; rerun 10/10 PASS on655a142ce. A bounded additional runtime assertion also passed 1/1: after resetting installed extensions,adminSettingsRegistry()is exactly the frozenADMIN_SETTINGS_REGISTRY;findAdminSettingreturns the same frozen base definition objects forcredentialSetup.cleanupRecoveryStepTimeoutMs(5,000) andcredentialSetup.cleanupRecoveryMaxAttempts(3). The existing real-resolver regressions fail if registration is absent, so no duplicate committed test is needed.Rule-81 statement remains: finite recovery remote waits 110s default / 500s maximum, with up to two successful-phase continuations and final metadata assessment; original-owner uncertainty quarantines on the immutable
max(expires_at, completed_at + execTimeout + capturePoll)watchdog (default at mostmax(remaining TTL, 33s)after claim, plus Cloudflare delivery latency). Successful settlement wakes sooner. SDK tracking is at most 3 polling chains/6 local counter writes per poll, approximately 1,800 writes over default 15-minute TTL/3-second polls. Live Q2 cleanup was observed complete by 40.554 seconds and stable through 110.944 seconds.Current-head CI/E2E completion and final serialized merge reconciliation remain pending. This records a carry-over; actual deployment and live checks were on
29badc8b6, not655a142ce.Current candidate — f0deee9 (2026-11-18 09:22 UTC)
Normal merge of main
b475dc41d(#2881 Inbox Result items and #2882 ProjectData duplicate wake refresh removal) into the existing branch. Previous655a142cefull CI 44268225712 and E2E 44268225869 succeeded. New-head full CI 44274752144 and E2E 44274752148 remain pending. New-head focused 127/127, API dependency build, secret-readback guard and diff check passed.The 62 newly merged upstream files overlap L19 only in two public docs (
admin-settings.md,agents.md). No L19 runtime/config/registry/test changes; the entire normalized feature patch remains SHA25602cb7d091ad064418f30e05ba695c46e6fef8fc00a4ee520d51368a72be39b3d. Independent Cloudflare/security carry review PASS: the ProjectData helper already refreshes claimed matches, Inbox changes do not interact with guided setup, and merged docs remain coherent. No additional L19 live case indicated.Actual staging evidence remains explicitly at
29badc8b6, successful deploy 44261504272: Instant reply, Q1 URL/code/cancel/D1/DO/pool/retry, Q2 provisioning cancellation and exact scrub-skipped log, cleanup and release all passed as detailed above. Coordinator accepted carry to655a142ce(verified event 55c2580f); extension tof0deee9e6is requested and pending, never presumed. Merge remains gated on that acceptance and current-head CI, followed by fresh main/review reconciliation and channel serialization.Coordinator carry extension accepted — 2026-11-18 09:28 UTC
Verified coordinator event
0051ed76-2fc6-4528-8d54-0d9fb8dee28aexplicitly extends the actual29badc8b6staging evidence throughf0deee9e6, conditional on current-head full CI and independent CF carry delta PASS (the latter is complete). The coordinator independently confirmed docs-only overlap and the identical feature patch. Full CI remains pending with no failures; E2E has completed.For the final fresh-main check, the coordinator permits merging the checked head if further main commits have no overlap with L19's 22 files, or overlap only in docs, and GitHub confirms conflict-free mergeability. Record that final overlap evidence here. Any runtime/config/registry/test overlap requires merging main and rerunning CI. Normal merge and channel serialization remain required.
Final merge gates — 2026-11-18 10:12 UTC
Candidate
f0deee9e618e57caa9ab142158253e3319f851f4: full CI 44274752144 SUCCESS, including all seven Workers shards and required aggregate; E2E 44274752148 SUCCESS. GitHub reports CLEAN/MERGEABLE with no pending or failed checks. Fresh Sonar API queries report 0 unresolved issues / 0 hotspots; unresolved review threads []. All local specialist/completion and bounded carry reviews PASS/ADDRESSED; recorded CodeRabbit terminal rate-limit/skip gate remains satisfied.Coordinator carry extension accepted, verified event
0051ed76-2fc6-4528-8d54-0d9fb8dee28a; original staged head remains explicitly29badc8b6, all agreed live cases and cleanup passed. Fresh main is74e14df351082d8a1f564bacf1aae68cdaad59c4; changes since candidate's incorporated mainb475dc41dtouch onlypnpm-lock.yamlandpnpm-workspace.yaml. Sorted intersection with the 22 L19 feature files is empty. This satisfies the coordinator's explicit no-overlap/conflict-free final-main condition. Channel history fresh through sequence358 has no other recent merge claim. Production #2841 merge hold was lifted in verified coordinator channel eventbe50db76-357a-4f17-8d19-46f82048d6ec. Normal merge authorized. All created resources and browser auth are cleaned; normal staging2 release 44266532245 succeeded. Coordinator owns production monitoring.