Repository navigation
fix(sessions): commit invitation membership with involvement - #184511
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. |
|
Codex review: needs maintainer review before merge. What this changesThis PR commits invitation membership together with mention involvement and publishes the committed membership to retained authorization readers. Example: Creator A invites B with mention sequence 2, then removes B and replays sequence 2.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR supplies a useful atomic invitation operation absent from current main; no actionable introduced defect was found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherSession collaboration workers receive prepared identities and current-authority checks, update SQLite membership and involvement, and publish commit receipts to session actors and retained access readers. flowchart LR
A[Prepared invitation] --> B[Collaboration writer]
B --> C[Atomic SQLite transaction]
C --> D[Membership and watermark]
C --> E[Committed receipt]
E --> F[Actor and retained readers]
F --> G[Gateway access checks]
Technical reviewBest possible solution: Land this atomic owner slice before activating the original-message invitation caller in the follow-up PR. Do we have a high-confidence way to reproduce the issue? Current-main source lacks the atomic invitation operation, and the supplied paired Gateway comparison distinguishes its membership result from main's mention-only control; no target code was executed during this review. Is this the best way to solve the issue? The change preserves one membership writer and one involvement transaction, carries their committed facts through existing receipts, and retains distinct failure coverage without unnecessary new machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2777468d26e5. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +124, Tests +164, Docs 0, Other +10. Total +298 across 16 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
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 HistoryReview history (8 earlier review cycles)
Reviewed November 2, 2026, 4:22 AM ET / 09:22 UTC (Revision 9). |
f35f96e to
f3b627a
Compare
408ed42 to
3abd346
Compare
f3b627a to
ce048ab
Compare
3abd346 to
5c077f0
Compare
ce048ab to
e9fa427
Compare
5c077f0 to
e899fd1
Compare
e9fa427 to
fee6104
Compare
e899fd1 to
524860f
Compare
|
@clawsweeper re-review Please review current head |
|
🦞👀 Re-review progress:
|
|
🦞👀 Re-review progress:
|
e8a8d56 to
572e578
Compare
3774237 to
14be106
Compare
|
@clawsweeper re-review Current head: The coordination-cleanup prerequisite now places both ACP databases under the canonical fixture owner and verifies that their actual native handles close before directory removal. Both old external-path controls failed; the repaired complete file passes 30/30 under pinned Bun, and both ACP cases pass 2/2 under Node. P0-P3 scoped review is clean. This seven-PR restack preserves all production and downstream source patches; descriptions include current source identities and exact test-line allowances. Please review this current head for remaining findings and required rank-up moves. |
|
🦞👀 Re-review progress:
|
Security-sensitive guard clearedCurrent revision: This PR no longer changes files in the maintainer security-review tier. Separate CODEOWNERS requirements still apply to security policy and enforcement files. |
14be106 to
2cea09a
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Match merged-profile invitation aliases before committing canonical membership and the mention watermark. Co-authored-by: jalehman <[email protected]> Co-authored-by: vincentkoc <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
What Problem This Solves
Invitation membership and mention involvement must commit together and immediately reach retained authorization readers.
User Impact
Adds an atomic membership/involvement operation and publishes exact committed member changes, including actor and in-flight read postimages.
Why This Change Was Made
Extend the existing SQLite transaction and publication owners. Reuse existing tables and watermarks; no schema bump or parallel ACL store.
Stack step 13/17, now targeting main after the prerequisite landings. Review and merge in order; each upper PR contains only its own slice against its predecessor.
Previous: wait for public startup admission in chat fixtures, closed as superseded by #186287; the branch is kept. Coordination cleanup #185982 is merged.
Next: commit invitations with original messages; release retained authority.
Stack order: complete stack.
Evidence
Current qualification — 2026-11-02
Head: e1cb25ea. Main base: c9cd215b. Only this slice's single commit was restacked; #184512 and upper stack branches were not changed. The writer-registry conflict preserves main's private-restore sink and the invitation transaction's exact caller registration.
Both blocking prerequisites are on main: #188056 repairs the inherited terminal-notice assertions, and #188055 repairs reader-validation capture during queued admission (merged as e3064bf). The exact-head CI gate succeeded. Hosted review is recorded in the canonical ClawSweeper comment.
Local qualification: 172/172 tests across six scoped suites, core and affected session/tooling test typechecks, targeted type-aware lint, formatting and diff checks passed. Main's test ceiling and allocations are unchanged: 6,387,509 lines / 6,399,928 allowed. SQLite live T1 calls remain 168 → 168, with T1-compat 15 → 15. The cold scoped command took 533.49 seconds, dominated by bundle transformation. An initial broad SDK-declaration setup timed out; required targeted lint then passed through the repository's canonical source-backed projects, with no skip flags, rule changes or timeout changes in tests. The isolated pairing scope-cap check separately passed 1/1 (15 unrelated cases were not selected).
AWS integration comparison — complete
Doctor passed before fresh lease cbx_a3bb19a9dd62, profile openclaw-check, machine c7a.2xlarge, measured 8 CPUs / 15,613 MiB RAM, Node 24.19.0. Run run_49e45539bf60d015d71fc525bf64e25c completed successfully. Both pinned revisions were independently installed, built and exercised through their real built Gateways with isolated state and ports. Head/base builds took 349 s / 379 s; their Gateway comparisons took 143 s / 144 s.
Synthetic A is the creator, B the invited member and C the non-member. Each signs the Gateway nonce; the normal trusted-proxy pairing owner enrolls the device under an explicit narrow scope cap and per-identity scope limits. The proxy is synthetic, not an external identity-provider integration. No model turn or provider credential was used.
The only unpushed tracked source change on either revision enables the existing invitation policy for proof, in src/config/zod-schema.gateway.ts:
Both revisions passed 196/196 expected/actual checks. The committed rollback coverage is in session-involvement-store.worker.test.ts and its sharing-owner sibling. Public membership and Gateway access are separate from the PR-only owner operation: this prefix does not activate the later human-mention caller. Offline owner calls run only after Gateway stop joins, acquire exclusive custody, and close workers before returning custody for restart. No ownership, authorization, cleanup or temporary-root guard was disabled. History is empty, so those rows prove admission rather than transcript rendering.
The lease was released and independently inspected: state=released, hasHost=false, ready=false, cleanupStatus=complete, provisioningResourceMayExist=false, cleanup completed 2026-11-02T09:09:01.049Z. Collected stdout remained readable after release with unchanged SHA-256 aa6f30965a9eb57ac4621e0731abf287f07d547601c7693e3af5dc4775089d57.
An earlier same-head attempt stopped at device-pairing setup before access assertions ran. Its lease cbx_da52f29efe63 was also released with complete cleanup. The corrected fixture uses the documented trustedProxy.deviceAutoApprove option with explicit bounded scopes; its nonce signatures, identity checks and durable pairing readback remain in force.
Main changes requiring this fresh comparison
The comparison range is 589348d..c9cd215. A conservative scan includes all changed core-session owners plus named membership, involvement, sharing, collaboration and transcript paths: 233 paths across 70 main commits, including #188055. Old AWS results were not carried forward as new-head proof.
Historical slice qualification
Slice head:
14be106704711b9e0f872ebec1b2ed374e0e1f41, on fixed main5bf0c41a03f1dba03d625460607ed5b959710458. The complete 13-file integration matrix passed 46/46 on pinned Bun atddc49fd63d3b82e41eb6c74af4ad935a56aebc8fbefore this main rebase. Main's canonical fixture repairs are preserved and duplicate prerequisite changes removed. Prefixes are not separately built locally; this prefix's hosted CI and review are recorded below.Sharing/involvement worker tests cover stale expected entries, replay watermarks and retained-reader publication. The final real-invitation SessionManager matrix adds actor and non-actor commit/rollback proof, including readers acquired before the write. Existing tables and schema versions are unchanged.
The extracted insert helper is registered with the writer guard. Its native wrapper and atomic involvement transaction are the only permitted callers; negative fixtures reject additional callers, including another function in the same worker file.
The stack evidence ledger records runtime results, prior build/upgrade proof and limits. Integration tests are owned by the final activation PR. Current-head hosted CI and review remain required before landing.
Pre-restack qualification (historical)
Required CI passed at
14be106704711b9e0f872ebec1b2ed374e0e1f41. The ClawSweeper review covers the same head and reports no actionable findings or required rank-up moves. Merge in the recorded stack order.Change size
Production and tooling +253/-119; tests +200/-36; generated inventory +2/-2. The growth reuses the existing transaction, commit-receipt and retained-publication owners; it adds no store, schema migration, protocol or config activation.
Test-line allowance
Main’s scalar ceiling and existing allocations are unchanged. Final canonical count: 6,387,509, below the existing effective ceiling 6,399,928. No test deletion or assertion weakening was used to fit the budget.
Prior-head qualification and investigations — historical
CI dependency follow-up — 2026-10-30
Both originally reported failures have scoped repairs. The inherited concise-notice test mismatch is merged in #188056, squash
b848e52d0490ea31ffe6067a2fbddff83a1552e1, after green exact-head CI and clean review. The transcript-reader failure is an inherited admission-ordering race in an unchanged owner: a preceding writer renews validation while a queued read retains its revoked receipt. #188055 has a deterministic real-worker red/green regression, Node 24 repeated controls on head/base, corrected test types and clean exact-head review atbf14009ac769a40b83f2c785361d4084fe239fb6.That dependency remains unmerged because its artifact-build job timed out rendering bundled root help after 120 seconds. A bounded isolated Node 24 build at its exact head passed, but that is not a fix or CI waiver. No CI rerun was requested. Consequently this stack PR remains at
a17fcb30f8a06286c8f2009f9e9c7f8f6c1d14e3: it has not been rebased or force-pushed before main contains both repairs. Its completed AWS evidence and released lease below remain pinned to that original tested head, not relabeled as new-head proof. #184512 and upper stack branches are untouched.The follow-up bounded root-help audit found no matching timeout in 24 readable scheduled-main logs or three executed other-PR logs over the selected 24-hour creation window (33 other-PR jobs skipped). Source tracing at the actual failed synthetic merge found no causal path from the reader repair; the hosted hang remains unattributed, with no proven fix. Both PRs remain blocked under the requested green-only gates. No speculative patch, timeout increase, CI rerun or chase rebase was made.
Current qualification — 2026-10-30
Final head:
a17fcb30f8a06286c8f2009f9e9c7f8f6c1d14e3; main base:589348d08f45e2509a59b2e17de7943377a58f8f. This is a patch-identical rebase of the previously reviewedb32303a4slice. No upper stack branch was changed.All six scoped suites passed 171/171: sharing/involvement owners 27, writer guard 101, replacement receipts 24, actor publication/replica siblings 19.
tsgo:core, affected tooling typecheck, targeted type-aware lint, formatting, diff checks and the database-worker ratchet passed. Live T1 calls remain 168 → 168. Main's test-line ceiling and allocations are unchanged: 6,281,410 lines against 6,328,569 allowed.AWS integration comparison — complete
AWS doctor passed. Fresh lease
cbx_c6e64594bd79, profileopenclaw-check, machinec7a.2xlarge, measured 8 CPUs / 15,613 MiB RAM. Runrun_3308fa83314485e91c17a4898ea0cbdbexited 0. Both pinned revisions were independently built and exercised through their real built Gateways with isolated state/ports and synthetic A (creator), B (invited member), C (non-member). Signed devices and the existing trusted-proxy fixture resolved the three profiles; no model turn or provider credential was used.The only unpushed tracked source delta on both revisions was
src/config/zod-schema.gateway.ts:viewandnoneretain their existing describe/list/history outcomes before membership, after add, after restart and after removalinvited, B/C start hidden; A adds B; B immediately gains describe/list/history access while C remains hiddenBoth revisions passed 174/174 expected/actual checks; all 10 offline-owner receipts were verified. Public membership and real Gateway authorization are distinct from the PR-only owner operation: the later stack slice activates the human-mention caller. The offline helper joins Gateway stop, acquires exclusive state custody, runs the ordinary worker operation (not native schema maintenance), closes resources and returns custody before restart. No authorization, native-owner, cleanup or temp-root guard was disabled. History is empty, so these rows prove admission rather than transcript rendering; the upstream proxy is synthetic rather than an external identity-provider test.
The lease was released and independently inspected at 2026-10-30T01:47:18.126Z:
state=released,hasHost=false,ready=false,cleanupStatus=complete,provisioningResourceMayExist=false. The downloaded stdout/receipt artifact remained readable after release with unchanged SHA-2561bcdccd8c6b70c74beb4e8ec6a51cf2126949a255c935bc01371062dd181156f.Previous-head CI investigation — historicals
CI run 40985610733 completed with two failed Node jobs and a failed
openclaw/ci-gate; the green-only landing condition is not met. No CI rerun or dispatch was requested.server.sessions.create.projects.test.ts, both remote-project retry cases, expected the detailed Git-clone failure notice but received the generic terminal failure notice. Inherited: both identical assertions also fail on the untouched exact main base589348d0. This needs a separate repair before the requested green-only merge.session-share-filters.integration.test.ts, transcript-publication revocation case,Session reader validation does not match its current physical owner. Unattributed: the complete file passed 10/10 on both this head and the exact main base, and passed in the earlier completed scheduled main run. Passing replays are not a fix and do not waive the failed gate.b32303a4thinking-claim failure remains unknown, not established as inherited or causally fixed. Its corresponding main job passed all three cases, includingdelivered-event. Historical replays below remain prior-head evidence.The implementation and AWS comparison are qualified, but the PR remains unmerged while these CI gates are red. A single exact-head hosted re-review is requested after this evidence update.
Landing qualification — 2026-10-29 (historical)
Head:
b32303a49b60f5d7469584cd3f2d204bcd6c414d; main base:07f1a4e4b6e0ff4ceb68f917ae3bdf459648bde2. Only572e578e..14be1067was replayed. After interruption, the old lease was explicitly released and its complete cleanup verified; the final rebase onto current main is patch-identical to the independently reviewed correction. All six scoped suites (171 tests) and static checks were rerun successfully on this final head. Range-diff records omission of the obsolete baseline raise, preservation of main’s follow-transcript and receipt tests, and the reviewed merged-profile correction.Behavior proof contract
This prerequisite adds the atomic owner operation; the ordinary human-mention caller is activated later in the stack. Public membership RPC smoke and owner-bound atomicity evidence are reported separately. Revocation removes access but deliberately retains the mention replay watermark, so replaying an old mention cannot restore membership.
Earlier AWS attempts — historical partial evidence
Doctor passed for AWS; fresh
openclaw-check/c7a.2xlargeleases measured 8 CPUs / 15,613 MiB RAM. The final head build, exact source pin, and the sole unpushedinvitedenum activation were verified. Synthetic A/B/C profiles were resolved by the real Gateway through the existing trusted-proxy fixture route, with signed devices; no model turn or model-provider credential was used.view/noneparity and main comparisonThe scratch fixture was corrected to bind the existing built native process owner, recognize the documented concealed-read response, and give only synthetic owner A the required management scope. The native-owner fixture regression passed 4/4. No native cleanup, ownership, authorization or temp-root guard was disabled. Offline-owner and temp-root fixture setup still required correction; these setup failures are not claimed as product verdicts. All finished task-owned AWS leases have been released with complete cleanup; the complete comparison remains pending.
Previous-head CI investigation — historical
CI run 40968201328 failed
checks-node-changed-compact-small-20-2:sessions-create-thinking-claim.test.ts,delivered-event, expected the thinking claimlowbut receivedundefinedat line 196. The failure is unknown, not established as inherited: the scheduled main comparison has no matching job or failure signature.The focused failed-selector replay passed 1/1; the pinned main base’s complete claim file passed 3/3; a reconstructed ten-file peer context passed 114/114 on this head. These passing replays do not establish a fix or waive the failed remote gate. No CI rerun or dispatch was requested, and no test assertion was weakened. Hosted re-review and merging remain deferred until the required behavior evidence is complete; merging also requires successful exact-head CI.