Repository navigation
fix: startup waits for transient shared-state schema admission - #195398
Conversation
Exercise the real webhook completion read after native bootstrap on the frozen beta source. Hosted baseline proof is pending; no local test execution. Co-authored-by: RomneyDa <[email protected]>
Reuse the existing bounded acquisition owner for native borrowing and final queued dispatch. Preserve true maintenance refusal, cancellation, identity checks, FIFO ownership, and one execution of the read and cleanup. Independent review found no production defect; corrected its queued cancellation expectation. Hosted proof pending; no local tests run. Co-authored-by: RomneyDa <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Complete the read authority contract for the offline Gateway owner inspection. Recheck its existing custody without adding ordinary-read retries. Co-authored-by: RomneyDa <[email protected]>
Update the synthetic worker benchmark for mandatory acquisition and format the startup regression. Co-authored-by: RomneyDa <[email protected]>
Keep generated non-isolated lifecycle fixtures compatible with required acquisition. Net test/support growth is 142 lines. Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR adds bounded waiting for transient shared-state schema admission before native borrowing and queued read dispatch. Example: A foreign schema lease remains held for 750 milliseconds before the startup webhook-completion read.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR addresses a concrete startup failure, and source review found no definite introduced production defect. Priority: P1 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherGateway startup and other shared-state consumers submit reads through an asynchronous owner that retains database custody, dispatches worker requests, and joins cleanup before returning results. flowchart TD
A[Gateway startup or state consumer] --> B[Shared read operation]
B --> C[Bounded admission acquisition]
C --> D[Native source borrowing]
C --> E[Queued worker dispatch]
D --> E
E --> F[Read result and cleanup]
Technical reviewBest possible solution: Retain bounded acquisition in the existing shared-read owner and forward-port the verified repair while preserving main's newer read paths. Do we have a high-confidence way to reproduce the issue? Source shows immediate admission refusal on the reported startup path, and the added integration scenario holds a real foreign schema lease before webhook completion; no reproduction was executed during this read-only review. Is this the best way to solve the issue? The patch uses the existing retry helper and read owner, updates all discovered authority callers, and avoids replaying queries or cleanup; simplification review found no unnecessary production machinery or duplicate regression group. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 795a03fe2429. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +48, Tests +146, Other +10. Total +204 across 11 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 8, 2026, 3:51 PM ET / 20:51 UTC. |
Adapt upstream source 625945b to the beta3 runtime owners. Keep synchronous SDK compatibility while deferring tool, model, plugin, process and state-handler initialization. Integrate on 67cc5d9, preserving #195398, #196301, #196386, #196387, #189991 and #196448. Three automatically merged overlaps retain canonical assertion/mock baseline removals and worker-turn input gating; no new behavioral adaptation. Original source reviews and focused build/test evidence are retained. Fresh integration-only independent review found no actionable issues. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vincentkoc <[email protected]>
* test: reproduce foreign schema lease before startup completion Exercise the real webhook completion read after native bootstrap on the frozen beta source. Hosted baseline proof is pending; no local test execution. Co-authored-by: RomneyDa <[email protected]> * fix: wait for transient state admission before async reads Reuse the existing bounded acquisition owner for native borrowing and final queued dispatch. Preserve true maintenance refusal, cancellation, identity checks, FIFO ownership, and one execution of the read and cleanup. Independent review found no production defect; corrected its queued cancellation expectation. Hosted proof pending; no local tests run. Co-authored-by: RomneyDa <[email protected]> * fix: preserve offline custody read admission Complete the read authority contract for the offline Gateway owner inspection. Recheck its existing custody without adding ordinary-read retries. Co-authored-by: RomneyDa <[email protected]> * fix(state): complete read authority callers Update the synthetic worker benchmark for mandatory acquisition and format the startup regression. Co-authored-by: RomneyDa <[email protected]> * test(state): update embedded read authority fixture Keep generated non-isolated lifecycle fixtures compatible with required acquisition. Net test/support growth is 142 lines. Co-authored-by: RomneyDa <[email protected]> * test(state): use valid persisted admission owner payloads Co-authored-by: RomneyDa <[email protected]> --------- Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 1d58dfd) Release adaptation: Retain the baseline prepared state-access owner and asynchronous file identity checks from #197510. The bounded acquisition owner also awaits asynchronous preparation and identity checking; it retries only unentered admission, never the query. FIFO turn discovery checks cancellation and captured path identity; final dispatch retains schema admission and file identity checks inside the same bounded acquisition, with turn release on failure. Retain the baseline benchmark readonly path. Focused proof pending. (cherry picked from commit 9bbd55f7d1ed998e5590128d9d6c71b71489b6bc)
Bracket the untraced startup read with the existing measurement owner to localize packaged startup schema contention. Keep all admission, timeout, retry, and error behavior unchanged; runtime proof remains pending. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 1fbf64f) Release adaptation: Required measurement prerequisite for the #195398 and webhook-evidence regression matrix. Original lane run reached neither injected webhook boundary, so retain the source measurement wrapper rather than weaken assertions. Create the routed synthetic state root with private mode 0700 so a group-writable host umask cannot invalidate the fixture. No host permissions or production temp safeguards changed. (cherry picked from commit 60e50428a3e7c6a52a2c0e27be6132d3c243618a)
What Problem This Solves
Repairs Gateway startup failure after an upgrade when a foreign shared-state schema lease is encountered immediately before the webhook completion read.
Related: #194770
Release scope
Deferred to the next beta per the maintainer's November 8, 2026 direction. This PR and its diagnostic runs are not prerequisites for 2026.11.5-beta.2. That release retains its previously frozen candidate and is recovering its original green qualification evidence. Do not adopt this patch into beta.2.
User Impact
Startup can wait for transient schema admission instead of failing immediately. Genuine offline maintenance, cancellation, and stale database identity still refuse the read. No schema migration or configuration change.
Why This Change Was Made
The existing read owner uses bounded acquisition at native borrowing and final queued dispatch, sharing the existing five-second budget. It never retries an entered query, snapshot, consumer callback, or cleanup. Regression coverage includes the real startup completion path and queued admission. Offline-custody inspection and synthetic benchmark/fixture callers implement immediate acquisition, without ordinary-read retries.
This is based on frozen beta source, not a rebase onto main. It does not adopt a new candidate or qualify publication. A main forward-port remains required.
Evidence and remaining gates