Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
21cbbbb to
0604340
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed September 22, 2026, 5:34 AM ET / 09:34 UTC (Revision 2). ClawSweeper reviewWhat this changesMoves persisted session membership changes to the existing database worker, updates callers to await completion, and preserves authorization and event ordering. Merge readiness✅ Ready for maintainer review The change remains useful: current main and v2026.9.5 still perform membership writes synchronously. No actionable introduced defect was found, and the current mergeable head resolves the previous conflict concern. Priority: P2 Review scores
Verification
How this fits togetherSession sharing controls who can access a conversation. Gateway membership requests authorize the caller, update the agent database, and publish committed access facts to readers and event subscribers. flowchart TD
A[Membership request] --> B[Current manager authorization]
B --> C{Storage owner}
C --> D[Persisted database worker]
C --> E[Process-local incognito store]
D --> F[Session check and transaction]
E --> F
F --> G[Committed sharing facts]
G --> H[Events and RPC response]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +243, Tests +201, Docs +8. Total +452 across 39 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep membership writes with the canonical worker while preserving live authorization, durable completion, and publication through the existing sharing owner. Do we have a high-confidence way to reproduce the issue? Yes, source establishes that current-main membership RPCs execute synchronous SQLite writes on the Gateway thread; no runtime reproduction was executed during this review. Is this the best way to solve the issue? Yes, the patch extends the existing worker owner and migrates its callers without adding a competing persistence or authorization contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9dc3d48e789c. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Run persisted membership mutations in the canonical agent executor while retaining exact session and commit authority checks. Publish committed member facts through the current sharing projection owner before observers, keep uncertain outcomes invalidating, and migrate internal callers to awaited completion.
0604340 to
054198a
Compare
|
Superseded by #155620 (cf32d5a), which landed the durable membership writes through the existing worker and write-admission owners alongside the membership projection work. This PR’s implementation and qualification remain useful provenance, but carrying its separate worker now would duplicate the landed owner. I checked the remaining behavior difference using the registered sharing handlers and real SQLite with the write queue held. The landed implementation retains the originally selected physical store across a route-only config change, as the storage contract permits. It still rejects revoked manager authority and replacement session instances. All 20 sharing tests and controls passed on the landed commit; the identical route comparison also confirmed why 054198 behaved more strictly. No missing required behavior was established. The earlier compiled measurements remain attributed to 054198 and are not a claim about all native SQLite calls on current main. Closing as superseded, not merged through this PR. |
Builds on the agent database execution foundation in #153150 and test isolation in #153286, both landed on
main. This PR targetsmain.What Problem This Solves
Adding or removing a persisted session member executes ordinary SQLite writes on the Gateway thread.
User Impact
Membership row mutations now run through the existing agent database worker. Authorization, responses, events, private database permissions, duplicate adds, and absent removals keep their existing behavior. Incognito membership retains its process-held native owner. No schema, retention, RPC, SDK, or migration contract changes.
Why This Change Was Made
Finite membership commands use the canonical agent executor and synchronous connection-bound kernels. Transaction and commit admission revalidate live manager authority, and the transaction checks the exact session instance and removal compare-and-swap conditions. Callers await durable completion.
The current-main integration preserves retained sharing facts: acknowledged writes update the existing projection before row observers run, while uncertain outcomes invalidate it. The retained-authorization regression fails with raw publication and passes for both durable and incognito stores after this integration. Existing evidence codecs moved to their sharing-identity owner without changing values or policy.
Evidence
Local validation below is bound to
054198a9a5394b5c8ab8c452479897ffb341b09f, based on main7fb336731e19227871609972fb6f6c7cb071b6c0. Hosted checks and review must bind the new published head.pnpm buildpassed on the frozen current-main candidate. Fresh source and proof-harness review through P2 found no actionable findings.session_membersDML. The full protected interval through reopen, cleanup, and exit also added no membership DML. All eight native methods plus construction were calibrated before product imports, with no reset. Late-write and unknown-database controls fail final acceptance.The 11-file behavior wrapper took 664.11 seconds, including imports and transforms. The native worker/lifecycle and registered authorization boundaries require these real flows; helper-only tests would not exercise commit admission, physical store custody, or publication before observers.
This is the membership mutation cutover, not complete Gateway SQLite offload. The raw capture contains 5,488 native calls during RPCs and 17,477 overall, including calibration, fixture/bootstrap, authority/projection reads, and other native work. The only three membership-DML counter hits were intentional positive calibration. This compiled proof covers Node 24 on macOS, with its actual SQLite 3.53.4 provider; it makes no Bun claim.