Skip to content

fix(sessions): apply membership when listing linked sessions - #184495

Merged
roboclaw-bot merged 5 commits into
mainfrom
fix/guest-access-02-inventory-20261026
Oct 27, 2026
Merged

roboclaw-bot merged 5 commits into
mainfrom
fix/guest-access-02-inventory-20261026

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Session lists and linked-session summaries must use the same membership facts as direct authorization.

User Impact

Prepares inventory, child and swarm projections for invitation-only visibility without changing configured role behavior yet.

Why This Change Was Made

Pass membership through the existing row preparation and presentation owners instead of treating a projection callback's metadata argument as membership.

Stack step 2/13, now based on main after step 1 merged as ce069f9f8374710. Review and merge in order; each upper PR contains only its own slice against its predecessor.

Previous (merged): fix(auth): define invitation-only session visibility.

Next: fix(gateway): retain membership checks across session reads.

Stack index: fix(auth): define invitation-only session visibility.

Evidence

Current inventory-only head — 87875a6

Restacked only the five step-2 commits onto main2b7647f1d6b32149c72d793f797ed62168d9fa83. The unrelated shared database-conformance fixture fix has been removed from this PR and is isolated in #185775, head582417a4a4a74639ee590ca086a53598a0bfbd4f. That race is intermittent and present in the shared main fixture; three passing main samples did not establish PR causation. The fixture PR has fresh Node24/Postgres17 24-case passes three times and is not merged here.

Listing conflict resolution and scoped verification

The conflict with main71acfa45/#185718 was resolved at session-utils-list.ts: keep entryFilter undefined when an unrestricted caller has no board or active-run predicate, but retain canonical physical-store membership checks for invited/restricted callers. Invitation-dependent visibility never reuses the entry-object WeakMap; retained serialized selection still takes the fresh invited path. Main's modelSearchMayMatch adapter and the unrestricted collector fast path remain intact. No new membership reader, cache, invalidation path, config option or protocol change.

Current-head check Result Wall time
Seven scoped suites: invited inventory/revocation, read-cache, presentation/events, plugin facts, prepared sharing 69 passed 212.14 s; revocation body1.88 s
Core typecheck Pass 8.17 s
Scoped typed lint, all12 changed files Pass 3.15 s
Format / diff check Pass <1 s
Independent full-patch P0–P2 review with owning modules Scoped-clean; fast-path and fresh-membership resolution verified Static review

Full exact-head CI40485771700 completed success on attempt1. No CI rerun or dispatch was requested. Fresh exact-head ClawSweeper review completed with no findings and no before-merge items. Current exact-head CI gate succeeds; GitHub reports non-draft, MERGEABLE/CLEAN. Fresh AWS proof is complete and all task leases are released. Landing criteria are verified; the fixture PR remains separate and is not merged here.

Fresh AWS (a)+(b) — PASS

Provider AWS / repository profile openclaw-check / standard class with explicit c7a.2xlarge. Doctor passed immediately before allocation. Measured8 CPUs and15,613 MiB RAM before installs. Fresh lease cbx_4a440c3d58a0. No hydration, instance IAM role, real credentials, Team data, external model call, or live Team Gateway. The canonical bootstrap verifies the exact head and absent IMDSv2 credential endpoint, pins Node24.22.1/pnpm12.15.0, and isolates install HOME.

Actual built Gateways ran through pnpm openclaw gateway run --bind loopback --port , separate synthetic HOME/state/config for every case, awaited /readyz, and authenticated over WS protocol4 using normal trusted-proxy auth and the built revision's real client build identity. Hello returned only read/write scopes and the expected policy cap. Offline synthetic profiles, sessions, memberships and completed collectors were committed through production persistence owners; live removals used session.members.remove. No Gateway/unit mocks or authorization patches.

(a) Built unmodified PR87875a6d and main merge-base2b7647f1 separately: 144.19 / 146.02 seconds. Existing view/none row sets and linked/collector summaries match main for owner, member and unrelated principals.

(b) Applied the same config-admission-only line to both disposable worktrees, committed locally only for normal CLI build freshness, and never pushed. Head-derived variant 51029b42d9a510bd00c1c634fe4a71689c59e55e built in116.33seconds; base-derived 17d3b5f474079d57385216c31e0d4bf070680b19 built in106.96seconds. No authorization or presentation source was modified for enablement:

-    others: z.enum(["none", "view", "suggest", "write"]),
+    others: z.enum(["none", "view", "suggest", "write", "invited"]),

Member receives parent+invited child and only that linked/collector child; unrelated receives nothing. Successful child-removal RPC → very next list is parent only with empty linked/collector summaries. Successful parent-removal RPC → very next list is empty. The main negative control does not leak: it omits invited noncreator rows even before removal, demonstrating missing admission rather than a manufactured baseline disclosure.

Revision Policy Owner rows Member rows Unrelated rows Scenario wall
base view 3 3 3 22.853 s
head view 3 3 3 23.355 s
base none 3 0 0 22.852 s
head none 3 0 0 23.027 s
base invited 3 0 0 24.307 s
head invited 3 2 0 23.144 s

Captured redacted protocol transcripts

Request/response projections retain the relevant decisions and both successful removal responses. Correlation/profile/session/agent/build IDs, keys, addresses and credentials are removed; rows use synthetic labels. Timing fields are measured. These are actual running Gateway results, not replayed or reconstructed frames.

(a) Unmodified existing-policy parity
[{"revision":"base","mode":"view","seedSeconds":11.691,"listings":{"owner":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]},"guest":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]},"unrelated":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}},"frames":[{"revision":"base","mode":"view","principal":"owner","request":{"type":"req","method":"connect","params":{"minProtocol":4,"maxProtocol":4,"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"view"}}}},{"principal":"owner","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}},{"revision":"base","mode":"view","principal":"guest","request":{"type":"req","method":"connect","params":{"minProtocol":4,"maxProtocol":4,"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"view"}}}},{"principal":"guest","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}},{"revision":"base","mode":"view","principal":"unrelated","request":{"type":"req","method":"connect","params":{"minProtocol":4,"maxProtocol":4,"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"view"}}}},{"principal":"unrelated","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}}],"wallSeconds":22.853},{"revision":"head","mode":"view","seedSeconds":11.875,"listings":{"owner":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]},"guest":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]},"unrelated":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}},"frames":[{"revision":"head","mode":"view","principal":"owner","request":{"type":"req","method":"connect","params":{"minProtocol":4,"maxProtocol":4,"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"view"}}}},{"principal":"owner","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}},{"revision":"head","mode":"view","principal":"guest","request":{"type":"req","method":"connect","params":{"minProtocol":4,"maxProtocol":4,"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"view"}}}},{"principal":"guest","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}},{"revision":"head","mode":"view","principal":"unrelated","request":{"type":"req","method":"connect","params":{"minProtocol":4,"maxProtocol":4,"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"view"}}}},{"principal":"unrelated","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}}],"wallSeconds":23.355},{"revision":"base","mode":"none","seedSeconds":11.66,"listings":{"owner":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]},"guest":{"count":0,"sessions":[]},"unrelated":{"count":0,"sessions":[]}},"frames":[{"revision":"base","mode":"none","principal":"owner","request":{"type":"req","method":"connect","params":{"minProtocol":4,"maxProtocol":4,"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"none"}}}},{"principal":"owner","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}},{"revision":"base","mode":"none","principal":"guest","request":{"type":"req","method":"connect","params":{"minProtocol":4,"maxProtocol":4,"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"none"}}}},{"principal":"guest","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}},{"revision":"base","mode":"none","principal":"unrelated","request":{"type":"req","method":"connect","params":{"minProtocol":4,"maxProtocol":4,"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"none"}}}},{"principal":"unrelated","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}}],"wallSeconds":22.852},{"revision":"head","mode":"none","seedSeconds":11.75,"listings":{"owner":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]},"guest":{"count":0,"sessions":[]},"unrelated":{"count":0,"sessions":[]}},"frames":[{"revision":"head","mode":"none","principal":"owner","request":{"type":"req","method":"connect","params":{"minProtocol":4,"maxProtocol":4,"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"none"}}}},{"principal":"owner","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}},{"revision":"head","mode":"none","principal":"guest","request":{"type":"req","method":"connect","params":{"minProtocol":4,"maxProtocol":4,"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"none"}}}},{"principal":"guest","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}},{"revision":"head","mode":"none","principal":"unrelated","request":{"type":"req","method":"connect","params":{"minProtocol":4,"maxProtocol":4,"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"none"}}}},{"principal":"unrelated","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}}],"wallSeconds":23.027}]
(b) Local-only invited variants, child and parent revocation
[{"revision":"base","mode":"invited","seedSeconds":11.691,"listings":{"owner":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]},"guest":{"count":0,"sessions":[]},"unrelated":{"count":0,"sessions":[]}},"frames":[{"revision":"base","mode":"invited","principal":"owner","request":{"type":"req","method":"connect","params":{"minProtocol":4,"maxProtocol":4,"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"invited"}}}},{"principal":"owner","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}},{"revision":"base","mode":"invited","principal":"guest","request":{"type":"req","method":"connect","params":{"minProtocol":4,"maxProtocol":4,"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"invited"}}}},{"principal":"guest","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}},{"revision":"base","mode":"invited","principal":"unrelated","request":{"type":"req","method":"connect","params":{"minProtocol":4,"maxProtocol":4,"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"invited"}}}},{"principal":"unrelated","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}},{"principal":"owner","target":"child","request":{"type":"req","method":"session.members.remove","params":{}},"response":{"type":"res","ok":true}},{"principal":"guest","phase":"after child revocation","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}},{"principal":"owner","target":"parent","request":{"type":"req","method":"session.members.remove","params":{}},"response":{"type":"res","ok":true}},{"principal":"guest","phase":"after parent revocation","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}}],"afterChildRevocation":{"count":0,"sessions":[]},"afterParentRevocation":{"count":0,"sessions":[]},"wallSeconds":24.307},{"revision":"head","mode":"invited","seedSeconds":11.746,"listings":{"owner":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]},"guest":{"count":2,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"parent","children":["child"],"collectors":["child"]}]},"unrelated":{"count":0,"sessions":[]}},"frames":[{"revision":"head","mode":"invited","principal":"owner","request":{"type":"req","method":"connect","params":{"minProtocol":4,"maxProtocol":4,"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"invited"}}}},{"principal":"owner","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}},{"revision":"head","mode":"invited","principal":"guest","request":{"type":"req","method":"connect","params":{"minProtocol":4,"maxProtocol":4,"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"invited"}}}},{"principal":"guest","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":2,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"parent","children":["child"],"collectors":["child"]}]}}},{"revision":"head","mode":"invited","principal":"unrelated","request":{"type":"req","method":"connect","params":{"minProtocol":4,"maxProtocol":4,"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"invited"}}}},{"principal":"unrelated","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}},{"principal":"owner","target":"child","request":{"type":"req","method":"session.members.remove","params":{}},"response":{"type":"res","ok":true}},{"principal":"guest","phase":"after child revocation","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":1,"sessions":[{"label":"parent","children":[],"collectors":[]}]}}},{"principal":"owner","target":"parent","request":{"type":"req","method":"session.members.remove","params":{}},"response":{"type":"res","ok":true}},{"principal":"guest","phase":"after parent revocation","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}}],"afterChildRevocation":{"count":1,"sessions":[{"label":"parent","children":[],"collectors":[]}]},"afterParentRevocation":{"count":0,"sessions":[]},"wallSeconds":23.144}]

Commands, artifacts and cleanup

Repository wrapper doctor --provider aws --json; fresh AWS warmup with public networking/no Tailscale; run --provider aws --fresh-pr #184495 --no-hydrate with canonical bootstrap pinned to87875a6d; separate frozen installs and pnpm build:runtime; retained --no-sync --no-hydrate standalone WS-driver runs; native stop and independent inspect. The reconstructed standalone seed was admitted against isolated local state before allocation, then executed remotely; it uses production profile/session/member/collector owners, not test fixtures.

Downloaded parity artifact SHA256 7470ef7e95fc9cace4950d5b24c133ea83f31def37da518ff91a3f2d07142a9b; invited artifact dfb916b8424a9b89a0dface10f7aab08a1ebabef2bbb790fb9cccf9abe2407bc. Hashes and readability were verified before and after teardown. Lease cbx_4a440c3d58a0 independently reports released, hasHost=false, ready=false, cleanupStatus=complete, provisioningResourceMayExist=false; cleanup completed 2026-10-27T10:32:33.141Z. All previous task leases were already verified released. No lease retained.

Prior root-cause, red/green, full-stack and CI history is retained unchanged in this superseded-evidence comment. No prior-head result is substituted for current-head proof.

Original human-provided integrated-stack context — historical

Original integrated-stack evidence (historical, not exact-head CI)
  • This head passes pnpm tsgo:core.
  • Relevant integrated coverage: Session sharing, list/read-cache, search-scope and row-presentation cases.
  • The complete stack at 344ee8b1dc99 matches the validated source tree: 448 focused tests passed, scoped typed lint, core/UI and affected test/plugin typechecks, formatting, config/i18n baselines, line-cap ratchet and git diff --check. pnpm build:runtime passed, including native protocol generation and the production UI bundle.
  • Independent review of the repaired source found no actionable P0-P2 issues. Trusted local proof used the documented fallback after the remote test host failed DNS resolution.

Production +89/-23 (+66 net); tests +0/-0. Production growth implements the access/transaction owner boundary described above; no parallel membership store is introduced.

These are review drafts. Hosted CI, integration with main newer than 9cf739b6c0da, live Team-server qualification and a latest-stable upgrade exercise are not claimed by this proof.

Supersedes the corresponding slice of #177257.

@vincentkoc vincentkoc self-assigned this Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: S labels Oct 26, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR applies current membership to session inventory, linked-child and collector summaries, buffered enrichment, and plugin facts.

Example: A member is invited to parent and child sessions under the staged invited policy.

  • Before: Inventory omits both sessions because selection does not supply membership.
  • After: Inventory includes both, then returns only the parent immediately after child membership is removed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused existing-owner implementation with distinct regressions, sufficient production-entry-point authority proof, and successful exact-head gates.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Built Gateway WS4 traces exercise sessions.list and live session.members.remove: the invited member receives parent and permitted child, the unrelated principal receives nothing, child removal clears its row and linked/collector summaries on the next list, and parent removal yields an empty list. Invited variants change only config admission on both arms; unmodified base/head runs preserve view/none behavior. Downloaded screenshots show later-stack mention UI and are not used as inventory proof.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Teams need invited users to discover permitted sessions and linked summaries without exposing unrelated conversations.
Reason: The maintainer-authored slice follows the merged invitation-policy direction, completes its stated inventory boundary, and preserves configured role behavior until planned activation.

Merge readiness

✅ Ready for maintainer review

This PR is a useful, scoped invitation-policy implementation with no actionable findings; the reviewed head has successful CI and sufficient Gateway behavior proof.

Priority: P2
Reviewed head: 87875a6d2cf09da6eeb1ab70ddf289d446580f7d

Before merge

None.

Findings

None.

Agent review details

How this fits together

Gateway session projections combine persisted session identities and membership with the current caller to produce authorized lists, linked summaries, and plugin facts.

flowchart TD
  A[Authenticated caller] --> B[Session list or facts read]
  C[Committed membership] --> D[Existing membership projection]
  B --> E[Current sharing policy]
  D --> E
  E --> F[Inventory and linked row presentation]
  F --> G[Authorized response]
Loading

Technical review

Best possible solution:

Land this membership-aware inventory slice through the existing projection owners while retaining the planned later configuration activation.

Do we have a high-confidence way to reproduce the issue?

Current-main source omits membership from inventory predicates; supplied built-Gateway base/head traces demonstrate the missing admission under explicitly enabled invited policy, without claiming that existing none behavior is a bug.

Is this the best way to solve the issue?

The patch implements the smallest complete inventory boundary by reusing canonical membership and sharing owners, retaining physical child identity, and avoiding stale invited visibility reuse.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against bf8b41aef7e1.

Provenance checked

  • Resident row preparation, physical lineage, and presentation keeps the original intent (c62c2d9: One resident projection owns current session facts and physical relationships; authorization and presentation consume fresh caller facts after readiness.)
  • Restricted child and collector filtering keeps the original intent (d853b6c: Unrestricted recipients skip redundant child reselection while restricted recipients retain visibility checks.)
  • List predicates and retained partitions keeps the original intent (71acfa4: Omit empty predicates for unrestricted lists; retained partitions reduce repeated selection work.)
  • Callback-scoped plugin session facts keeps the original intent (70cfa76: Retain authorized selections while refreshing changed facts and preserving exact-key SDK behavior.)
  • Buffered enrichment authorization keeps the original intent (30a2198: Consolidate operations under existing owners while preserving authorization and post-await revalidation.)
  • Invited policy and unchanged existing roles keeps the original intent (ce069f9: Define membership-based invitation visibility while preserving creator/admin access, none ceilings, and staged configuration activation.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit ce069f9 adds src/gateway/session-sharing-read.ts:137 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ce069f9f8374; files: src/gateway/session-sharing-read.ts)
  • Peter Steinberger: Raw commit 4e4e315 adds src/gateway/session-row-presentation.ts:162 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4e4e315729fd; files: src/gateway/session-row-presentation.ts)

PR surface

Source +88, Tests +350. Total +438 across 12 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 9 125 37 +88
Tests 3 350 0 +350
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 475 37 +438

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +125/-37; tests +350/-0 Growth carries physical ownership and current membership through existing readers; tests cover distinct disclosure and revocation boundaries without adding a membership store or cache.

Root-cause cluster

Relationship: partial_overlap
Canonical: #135631
Summary: This PR implements the inventory portion of the broader invitation-only visibility request; policy and direct reads have separate stack slices.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded session-sharing capability improvement with configuration activation deliberately deferred.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (10 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-27T02:26:00.204Z sha 02dd246396556585c64f726b9e897fb47ba6c48b :: needs changes before merge. :: [P2] Resolve membership through the sharing principal for actor-only clients
  • reviewed 2026-10-27T02:47:45.271Z sha 499bceb23f19b99769018513789c3d7300bdfa12 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-27T04:41:50.837Z sha fb2cd57 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-27T07:37:18.893Z sha 0485c52 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-27T07:51:17.453Z sha 0485c52 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-27T08:51:45.941Z sha ece41bf :: needs maintainer review before merge. :: none
  • reviewed 2026-10-27T09:08:29.227Z sha dc1984036c682dd980f0a06d320948e72fdb579b :: needs maintainer review before merge. :: none
  • reviewed 2026-10-27T10:11:21.181Z sha 87875a6 :: needs maintainer review before merge. :: none

Reviewed October 27, 2026, 6:40 AM ET / 10:40 UTC (Revision 11).

@roboclaw-bot
roboclaw-bot force-pushed the fix/guest-access-01-policy-20261026 branch from 25cb175 to 811072c Compare October 27, 2026 00:02
Base automatically changed from fix/guest-access-01-policy-20261026 to main October 27, 2026 01:51
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M and removed size: S labels Oct 27, 2026
@roboclaw-bot
roboclaw-bot force-pushed the fix/guest-access-02-inventory-20261026 branch from 51bd0f0 to 02dd246 Compare October 27, 2026 02:12
@openclaw-barnacle openclaw-barnacle Bot removed the app: web-ui App: web-ui label Oct 27, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 27, 2026 02:12
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Oct 27, 2026
@clawsweeper clawsweeper Bot added the rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. label Oct 27, 2026
@roboclaw-bot
roboclaw-bot force-pushed the fix/guest-access-02-inventory-20261026 branch from ece41bf to dc19840 Compare October 27, 2026 08:59
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

roboclaw-bot and others added 5 commits October 27, 2026 10:03
Replay only step 2 onto the merged invitation-only policy. Preserve physical child ownership during membership authorization and add final-disclosure regressions.

Co-authored-by: Vincent Koc <[email protected]>

Co-authored-by: jalehman <[email protected]>
Preserve actor-only autonomous membership checks without changing creator or involving-me attribution.

Co-authored-by: jalehman <[email protected]>
Qualify membership-aware collector summaries and revocation alongside the unrestricted child-reselection fast path.

Co-authored-by: jalehman <[email protected]>
Do not reuse metadata-only filtered partitions for invitation-dependent inventory. Preserve existing cache ownership and unrestricted collector fast paths.

Co-authored-by: jalehman <[email protected]>
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Superseded qualification and triage history, retained unchanged. Current PR-body evidence applies to the latest inventory-only restack.

What Problem This Solves

Session lists and linked-session summaries must use the same membership facts as direct authorization.

User Impact

Prepares inventory, child and swarm projections for invitation-only visibility without changing configured role behavior yet.

Why This Change Was Made

Pass membership through the existing row preparation and presentation owners instead of treating a projection callback's metadata argument as membership.

Stack step 2/13, now based on main after step 1 merged as ce069f9f8374710. Review and merge in order; each upper PR contains only its own slice against its predecessor.

Previous (merged): fix(auth): define invitation-only session visibility.

Next: fix(gateway): retain membership checks across session reads.

Stack index: fix(auth): define invitation-only session visibility.

Evidence

PostgreSQL retirement-fixture triage and repair — de6d086d23b83c6072e13384d3b49b594572fba2

Classification for repair routing: (iii), observed only on the PR head; intermittent. Three clean-main runs did not fail, so neither inherited failure nor intermittent failure on both revisions is claimed. The relevant lifecycle/test blobs are identical on main and head; the samples do not establish a PR-caused production defect. This conservative route repairs the test precondition on this branch rather than asserting a main-CI exception.

Original exact-head CI40477425798 completed failed: PostgreSQL conformance (3/3) and dependent ci-gate failed; (1/3) and (2/3) succeeded. The failing case is mixed-agent-lifecycle.conformance.test.ts → state=sqlite agent=sqlite → holds the shared retirement guard through the actual agent commit. CI reported OpenClawAgentDatabaseLeaseActiveError. Recent scheduled main b3b0f1b had all three PostgreSQL conformance jobs pass, including job122092193664.

Matched local comparison

Real pinned pgvector PostgreSQL17 image, identical to CI (digest ac08538c6f8b9904c33c8224c5e5706dbe760aca29db1d096972b4052c22a75d), ran in a task-owned rootless Podman container with an automatically allocated loopback port. Each test generated separate state/config/schema namespaces; no Team data or credentials. Main was clean f1fe222; the original PR was dc1984036c682dd980f0a06d320948e72fdb579b. Each invocation ran the full target file, 24 cases across all four SQLite/PostgreSQL engine pairs, through the repository conformance launcher with maxWorkers=1. No CI rerun/dispatch was used.

Runtime / revision Run1 Run2 Run3 Outcome
Host Node26.12.1 / clean main 117.06 s 62.37 s 72.05 s 24/24 each
Host Node26.12.1 / PR 84.49 s 68.73 s 85.02 s 24/24 each
CI-matched Node24.22.1 / clean main 85.01 s 80.90 s 81.16 s 24/24 each
CI-matched Node24.22.1 / PR 112.86 s (fail) 82.20 s 111.71 s Same retirement case failed once; 23/24, then24/24 twice

The local failure was AgentDatabaseExecutionAdmissionClosedError / “Agent database resources are closing” at native cleanup executor registration, another observable consequence of the same unjoined close boundary; it is not mislabeled as the identical CI error. Initial container-reachability-only attempts discovered that ordinary exec completion reaped detached fixture processes; those setup failures executed no tests and are excluded. Subsequent comparisons owned server and workload in one foreground lifecycle, and cleanup removed each container.

Command on both revisions: node scripts/test-database-conformance.mjs --engine postgres --connection -- src/infra/database-engine/mixed-agent-lifecycle.conformance.test.ts --maxWorkers=1. CI Node24.22.1 was installed only in task scratch from the canonical pinned archive/hash; the shared host runtime was unchanged.

Owner and minimal repair

The fixture used closeOpenClawAgentDatabaseByPath synchronously immediately before deletion. Its production owner at openclaw-agent-db-lifecycle.ts:306 starts revokeAgentDatabaseResources without joining the returned promises; its comment explicitly retains native leases until async work joins. Resource registration correctly refuses a still-closing owner. The fixture therefore depended on worker close timing rather than a settled retirement precondition. The repair awaits the existing drainAgentDatabaseResources owner and leaves the actual native close inside synchronous engine admission. All original lease, foreign-lock and final-commit assertions remain intact; no sleep, retry, ignore, production or schema change was added. Delta: one test file, +5/-1.

The suspected aedd9f3/#185639 only coalesces postcommit diagnostic messages; it changes no lease mutation, physical close or seal check. No causal attribution to it is established.

Repair verification Result Wall
Fixed clean-main candidate, Node24 + real Postgres 24/24 passed three times 80.06 / 61.72 / 68.43 s
Repaired PR candidate, same runtime and protocol 24/24 passed 69.07 s
Seven session scoped suites including child/parent revocation 69 passed 104.35 s
Owning infra test typecheck Pass 3.48 s
Core typecheck Pass 0.63 s
Scoped typed lint / format / diff Pass 1.90 s lint
Independent P0–P2 review Scoped-clean; owner ordering and synchronous admission preserved Static review

Published with the branch lease pinned to dc1984036c682dd980f0a06d320948e72fdb579b. AWS carry-over below remains applicable: this new commit changes only a test fixture, not a production visibility or membership owner. All AWS leases and local PostgreSQL containers are released. Current gate/coordination blocker: no full CI run is attached to new head de6d086d23b83c6072e13384d3b49b594572fba2 because GitHub reports a content conflict with newer main84e9a4868c7ffe805fcba33f952636272bee95a9. Read-only merge-tree confirms src/gateway/session-utils-list.ts is conflicted. That new visibility-path integration is not resolved by this test-only triage. The requested exact-head ClawSweeper review is in progress. Separately, original-head CI40477425798 was rerun by GitHub actor vincentkoc (attempt2 started09:28:13Z) and completed success09:50:33Z; the failed result above is attempt1. No CI rerun/dispatch was requested by Roboclaw, and attempt2 on dc198403 is not new-head evidence. No merge authorized or attempted in this triage.

Earlier evidence below is retained as head-stamped history.

Final restack after the worker-fixture repair — dc1984036c682dd980f0a06d320948e72fdb579b

#185673 merged as dfdc696 after exact-head successful CI and CLEAN checks. Its 16-test worker-recovery suite passed again on that landed SHA (93.12 seconds wall). Both required human coauthor trailers are preserved.

Only this PR's five existing step-2 commits were replayed onto that new main. Range-diff confirms every patch unchanged; lease matched prior ece41bf. No upper-stack branch or root delta was added.

AWS proof explicitly carries over to this head. Exact audited main range:

cba6fee..dfdc696

Changed production paths in the required proof boundary: [] (empty). The audit includes session-row-presentation.ts, session-utils-list.ts, session-sharing-read.ts, all config/sessions/session-sharing* and membership-store paths, the actual sessions.list handler sessions-read.ts, and sessions-sharing*.ts handlers. The broader session-row/sharing/handler audit contains only sessions-read.test.ts and session-sharing.worker.test.ts changes; no production owner changes. Therefore the complete AWS (a)+(b) qualification below remains valid for this patch-identical head; no fresh lease or repeated AWS run was needed. Its sole enum-admission enablement remains local/unpushed. All task-owned leases are released with independently verified completed cleanup, and artifact hashes still match.

Final-head check Result Wall time
Seven scoped suites, including real serialized child/parent revocation 69 passed 130.55 s; revocation body 1.45 s
Core typecheck Pass 4.22 s
Scoped typed lint, all 12 changed files Pass 2.12 s
Format / diff check Pass <1 s

Landing stopped on a failed exact-head gate. PostgreSQL conformance (3/3), job122099750475 failed: src/infra/database-engine/mixed-agent-lifecycle.conformance.test.ts → state=sqlite agent=sqlite lifecycle conformance → holds the shared retirement guard through the actual agent commit. Error: OpenClawAgentDatabaseLeaseActiveError, agent retiring database still open in another process. No attribution or fix is claimed. Other PostgreSQL jobs were still running when observation stopped. No CI rerun, dispatch, repair, or #184495 merge was attempted. ClawSweeper completed on exact head dc1984036c682dd980f0a06d320948e72fdb579b with no findings and no before-merge items; the CI gate remains unsatisfied. AWS carry-over and released-lease evidence above remain valid.

The earlier status reports below are retained as revision-bound history, not current readiness.

Current main restack and fresh AWS qualification — ece41bf

Only the four existing step-2 commits were replayed onto cba6fee; range-diff confirmed all four patches identical. The push lease matched 0485c52. No root slice or upper-stack commits were copied. The inherited sharing-key scope/alias optimization (#185627), running-candidate selection (#185148), activity-summary eligibility (#185514), and input-custody changes (#185601) remain intact. Both unrestricted collector guards and invited membership checks survive. Fresh AWS proof below replaces, rather than carries over, prior-head proof.

One small follow-up shares the existing full-row predicate between collector presentation and activity-summary eligibility (+3/-8). This removes duplicate sidebar/dashboard policy and repairs the 703-line scoped-lint failure exposed by the restack; no formatting suppression or limit change. Independent P0–P2 review found the boolean factoring equivalent and scoped-clean.

Current-head check Result Wall time
Seven scoped suites: invited inventory/revocation, read-cache, presentation/events, plugin facts, prepared sharing 69 passed 123.25 s
Follow-up affected suites, including serialized revocation 17 passed in 3 files 67.25 s; revocation body 1.66 s
Core typecheck Pass, including after follow-up 6.72 / 2.13 s
Scoped typed lint, all 12 touched files Pass 2.2 s
Format / diff check Pass <1 s
Independent P0–P2 review Scoped-clean Static review

Fresh AWS (a)+(b) — PASS

Provider AWS, repository profile openclaw-check, standard class / c7a.2xlarge; measured 8 CPUs and 15,613 MiB RAM before installation. Doctor passed. Fresh lease cbx_11470a7ef872. No hydration, instance IAM role, real credentials, external model calls, or Team data. Canonical trusted bootstrap verified the exact head and absent IAM credentials endpoint, installed Node24.22.1/pnpm12.15.0, and used isolated install HOME.

Built unmodified ece41bf and main merge-base cba6fee separately with pnpm build:runtime: 140.58 / 142.72 seconds. Actual built Gateways ran through the normal CLI with separate synthetic state/HOME/config and loopback ports. Authenticated WS protocol4 connect/sessions.list used normal trusted-proxy auth, read/write scopes only, and the actual build identity. Linked and completed collector children were seeded through production persistence owners; removals used live session.members.remove RPCs.

(a) Existing view/none row and linked/collector sets match main for owner, member, and unrelated profiles. Runtime command124.800 seconds including orchestration.

(b) Both worktrees received the same local-only one-line invited config-enum admission, never pushed. Head-derived proof variant253a581e0cb41045d54b0776cdf9d0d873225605 built in122.03 seconds; base-derived046ca583b3bd4850f332852a15c04ae037996aaa built in113.26 seconds. No authorization source was modified:

-    others: z.enum(["none", "view", "suggest", "write"]),
+    others: z.enum(["none", "view", "suggest", "write", "invited"]),

Invited member sees parent+child and only the invited linked/collector child; unrelated sees none. Successful child removal → very next list is parent only with empty child/collector summaries. Successful parent removal → very next list is empty. Main's negative control does not leak: it omits invited noncreator sessions even before revocation. This PR supplies missing membership admission. Runtime command74.098 seconds including orchestration.

Revision Policy Owner rows Member rows Unrelated rows Scenario wall
base view 3 3 3 25.199 s
head view 3 3 3 25.130 s
base none 3 0 0 25.140 s
head none 3 0 0 25.084 s
base invited 3 0 0 25.222 s
head invited 3 2 0 25.177 s

Fresh redacted request/response transcripts

Captured relevant response projections follow. Correlation/profile/session/agent/build IDs, keys, addresses and credentials are removed; synthetic labels identify rows. Parent-removal response was checked by the driver but not retained as its own frame; the next-list result is retained. No frames are reconstructed.

(a) Unmodified head/main view and none
[{"revision":"base","mode":"view","seedSeconds":13.01,"listings":{"owner":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]},"guest":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]},"unrelated":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}},"frames":[{"revision":"base","mode":"view","principal":"owner","request":{"type":"req","method":"connect","params":{"client":{"mode":"webchat"},"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"view"}}}},{"principal":"owner","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}},{"revision":"base","mode":"view","principal":"guest","request":{"type":"req","method":"connect","params":{"client":{"mode":"webchat"},"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"view"}}}},{"principal":"guest","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}},{"revision":"base","mode":"view","principal":"unrelated","request":{"type":"req","method":"connect","params":{"client":{"mode":"webchat"},"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"view"}}}},{"principal":"unrelated","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}}],"wallSeconds":25.199},{"revision":"head","mode":"view","seedSeconds":13.008,"listings":{"owner":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]},"guest":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]},"unrelated":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}},"frames":[{"revision":"head","mode":"view","principal":"owner","request":{"type":"req","method":"connect","params":{"client":{"mode":"webchat"},"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"view"}}}},{"principal":"owner","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}},{"revision":"head","mode":"view","principal":"guest","request":{"type":"req","method":"connect","params":{"client":{"mode":"webchat"},"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"view"}}}},{"principal":"guest","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}},{"revision":"head","mode":"view","principal":"unrelated","request":{"type":"req","method":"connect","params":{"client":{"mode":"webchat"},"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"view"}}}},{"principal":"unrelated","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}}],"wallSeconds":25.13},{"revision":"base","mode":"none","seedSeconds":12.838,"listings":{"owner":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]},"guest":{"count":0,"sessions":[]},"unrelated":{"count":0,"sessions":[]}},"frames":[{"revision":"base","mode":"none","principal":"owner","request":{"type":"req","method":"connect","params":{"client":{"mode":"webchat"},"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"none"}}}},{"principal":"owner","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}},{"revision":"base","mode":"none","principal":"guest","request":{"type":"req","method":"connect","params":{"client":{"mode":"webchat"},"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"none"}}}},{"principal":"guest","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}},{"revision":"base","mode":"none","principal":"unrelated","request":{"type":"req","method":"connect","params":{"client":{"mode":"webchat"},"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"none"}}}},{"principal":"unrelated","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}}],"wallSeconds":25.14},{"revision":"head","mode":"none","seedSeconds":12.804,"listings":{"owner":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]},"guest":{"count":0,"sessions":[]},"unrelated":{"count":0,"sessions":[]}},"frames":[{"revision":"head","mode":"none","principal":"owner","request":{"type":"req","method":"connect","params":{"client":{"mode":"webchat"},"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"none"}}}},{"principal":"owner","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}},{"revision":"head","mode":"none","principal":"guest","request":{"type":"req","method":"connect","params":{"client":{"mode":"webchat"},"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"none"}}}},{"principal":"guest","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}},{"revision":"head","mode":"none","principal":"unrelated","request":{"type":"req","method":"connect","params":{"client":{"mode":"webchat"},"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"none"}}}},{"principal":"unrelated","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}}],"wallSeconds":25.084}]
(b) Local-only invited variants and live revocation
[{"revision":"base","mode":"invited","seedSeconds":12.721,"listings":{"owner":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]},"guest":{"count":0,"sessions":[]},"unrelated":{"count":0,"sessions":[]}},"frames":[{"revision":"base","mode":"invited","principal":"owner","request":{"type":"req","method":"connect","params":{"client":{"mode":"webchat"},"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"invited"}}}},{"principal":"owner","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}},{"revision":"base","mode":"invited","principal":"guest","request":{"type":"req","method":"connect","params":{"client":{"mode":"webchat"},"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"invited"}}}},{"principal":"guest","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}},{"revision":"base","mode":"invited","principal":"unrelated","request":{"type":"req","method":"connect","params":{"client":{"mode":"webchat"},"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"invited"}}}},{"principal":"unrelated","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}},{"principal":"owner","request":{"type":"req","method":"session.members.remove","params":{}},"response":{"type":"res","ok":true}},{"principal":"guest","phase":"after child revocation","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}},{"principal":"guest","phase":"after parent revocation","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}}],"afterChildRevocation":{"count":0,"sessions":[]},"afterParentRevocation":{"count":0,"sessions":[]},"wallSeconds":25.222},{"revision":"head","mode":"invited","seedSeconds":12.745,"listings":{"owner":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]},"guest":{"count":2,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"parent","children":["child"],"collectors":["child"]}]},"unrelated":{"count":0,"sessions":[]}},"frames":[{"revision":"head","mode":"invited","principal":"owner","request":{"type":"req","method":"connect","params":{"client":{"mode":"webchat"},"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"invited"}}}},{"principal":"owner","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":3,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"hidden","children":[],"collectors":[]},{"label":"parent","children":["child","hidden"],"collectors":["child","hidden"]}]}}},{"revision":"head","mode":"invited","principal":"guest","request":{"type":"req","method":"connect","params":{"client":{"mode":"webchat"},"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"invited"}}}},{"principal":"guest","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":2,"sessions":[{"label":"child","children":[],"collectors":[]},{"label":"parent","children":["child"],"collectors":["child"]}]}}},{"revision":"head","mode":"invited","principal":"unrelated","request":{"type":"req","method":"connect","params":{"client":{"mode":"webchat"},"role":"operator","scopes":["operator.read","operator.write"]}},"response":{"type":"res","ok":true,"payload":{"type":"hello-ok","auth":{"method":"trusted-proxy","scopes":["operator.read","operator.write"],"sessionCap":"invited"}}}},{"principal":"unrelated","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}},{"principal":"owner","request":{"type":"req","method":"session.members.remove","params":{}},"response":{"type":"res","ok":true}},{"principal":"guest","phase":"after child revocation","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":1,"sessions":[{"label":"parent","children":[],"collectors":[]}]}}},{"principal":"guest","phase":"after parent revocation","request":{"type":"req","method":"sessions.list","params":{"limit":50}},"response":{"type":"res","ok":true,"payload":{"count":0,"sessions":[]}}}],"afterChildRevocation":{"count":1,"sessions":[{"label":"parent","children":[],"collectors":[]}]},"afterParentRevocation":{"count":0,"sessions":[]},"wallSeconds":25.177}]

Current CI and main repair fallback

Exact-head CI40473160665 completed failed. Only the worker-recovery shard and its dependent aggregate gate failed; all other planned jobs completed without failure, including PostgreSQL conformance. Its completed checks-node-changed-compact-large-26 fails the same eight worker-turn-launcher-failure-recovery cases and unhandled worker-environment error already verified in main CI40468589754. No rerun was requested. The independent worker-fixture repair is #185673, head1b9ffbbd2e832aa2212dfee16434af732877e262: all16 tests and owning typecheck/lint/format pass. Direct fast-forward publication was refused by the repository ruleset requiring a PR. That repair is not folded into this step-2 slice and has not been merged here. Current security-sensitive and dependency reviews pass. Fresh ClawSweeper review completed on exact head ece41bf with no findings, no before-merge items, sufficient shipped-entry-point proof. GitHub reports non-draft, MERGEABLE / BLOCKED, not CLEAN. No merge or approval submitted. No CI rerun/dispatch was requested; prior-head green CI is not claimed for this head.

Commands, retention and cleanup

Commands: repository Crabbox wrapper doctor/warmup/run with --provider aws; --fresh-pr #184495 and canonical bootstrap pinned to the stated head; separate frozen install and build:runtime per revision; retained --no-sync --no-hydrate commands invoking the standalone WS driver; actual pnpm openclaw gateway run --bind loopback --port processes. No mocked authorization or recorded-response replay.

Downloaded parity artifact SHA256 a5cb815fcd283bc062659e7896a14d954372b9b0d64b525396cf864c207e9be5; invited artifact6016a64fa4cb7d480916b5b5f4951061fa9514304f9bec2e5a6cc6575bbf1907. Both remain readable with matching hashes after teardown. Lease cbx_11470a7ef872 independently verified released, hasHost=false, ready=false, cleanupStatus=complete, provisioningResourceMayExist=false; cleanup completed2026-10-27T08:43:57.039Z. No lease retained.

Prior AWS/full-stack/root-cause and exact-head evidence is retained unchanged in this historical comment. It includes the original fb2cd57 revocation failure, native full-stack344ee8b1 pass, owner fix and red/green regression. The older body below is preserved as head-stamped history, not current CI or merge readiness.

Earlier verification — historical only

Current restack verification (2026-10-27)

Resolved the conflict with Peter's unrestricted collector fast path. Both outer entryFilter guards survive: unrestricted callers skip child reselection, while invited/restricted callers still execute membership-aware checks for ordinary child links and collector/swarm summaries using physical store ownership. The extended invited regression checks profile and actor-only callers, excludes the uninvited collector child, and removes the invited child after revocation. The inherited presentation regression also confirms zero collector-child selections for admin/unrestricted callers and filtering for restricted viewers.

Current restack check Result Wall time
Invited inventory + row presentation + prepared session-event suites 23 passed in 3 files 107.33 s, including cold compilation
pnpm tsgo:core Pass 7.86 s
Scoped typed lint, 11 changed files Pass 72.81 s
Format and git diff --check Pass <1 s
Fresh independent Codex autoreview, P0-P2 Scoped-clean; both fast-path guards and membership checks verified Static review

Replayed only the two step-2 commits, then added the collector regression extension. The branch lease matched prior head 499bceb23f19b99769018513789c3d7300bdfa12. No new Vincent-authored branch commits, issue comments, inline review comments, or submitted reviews were present on this PR at inspection; no upper-stack branch was modified. Dependencies were reconciled to the newly inherited main lockfile in this task-owned checkout. The earlier exact-head CI and ClawSweeper results below belong to the pre-restack head; fresh results for fb2cd5746d1c9d645ab7af9981f3b1bfa22fe12a are complete: full CI 40450565012 succeeded (76 planned jobs; no failures; elapsed 22 min 55 s), CI gate and security review succeeded, and ClawSweeper reviewed this exact head with no findings and no before-merge items. The PR is non-draft, MERGEABLE and CLEAN; no approval or merge was submitted.

Current head: fb2cd5746d1c9d645ab7af9981f3b1bfa22fe12a, restacked onto main 20ef85f3acde0e2783c096f0dcd94c6520f3ccdc. Only the original step-2 delta was replayed; step 1 is not duplicated.

Retained pre-restack verification (499bceb2)

Check Result Wall time
pnpm tsgo:core Pass 2.80 s
Gateway-root / Gateway-server test types Pass 1.83 / 1.75 s
Invited inventory regression file 3 passed; test bodies 2.24 s 11.29 s
Trusted plugin facts regression file 21 passed 13.35 s
Related presentation, prepared-read, sharing, navigation, row-materialization suites 72 passed in 6 files 41.87 s
Scoped typed lint (10 original files, then 4 repair files) Pass 10.75 / 58.37 s
Formatting and git diff --check Pass <1 s

Production-path response assertions, using isolated test state and the real committed membership/projection owners:

  • Inventory: an invited member receives parent + invited child, never the unrelated child; an unrelated profile receives no rows; the owner still receives all three.
  • Linked children: revoking the child's membership removes the child both from inventory and from the parent's childSessions. Buffered enrichment rechecks membership and rejects the revoked child.
  • Final inventory disclosure: membership is revoked after initial selection, before asynchronous exact-row preparation completes; the final response and buffered enrichment contain no protected rows.
  • Trusted plugin facts: exact and retained selected facts include the invited row and exclude its nearest nonmember sibling; revocation during preparation removes the protected facts from both paths.
  • Physical ownership: two federated stores contain the same sentinel key. Membership in the default-store copy does not disclose the linked child in the other store; membership in the actual lineage store permits it, independently of the default-store membership.

Negative controls: the inventory regression fails against main ce069f9f8374710 because the invited member receives [] instead of the parent + child (65.14 s). Removing the physical locator from the repaired linked check fails because the unauthorized sentinel child is disclosed (46.10 s).

Independent Codex autoreview (GPT-6.1 Sol, P0-P2) identified the linked physical-store lookup omission. The producer now retains the physical locator through compact child facts, reuse comparison, and final membership lookup. The follow-up review found no additional P0-P2 defects in the repaired working-tree candidate; its remaining INDEX-only finding was resolved by staging that identical repair before committing. No parallel membership store, new configuration, schema, or protocol change was added.

This is boundary/in-process Gateway proof, not a live Team Gateway or model run. Only the prepared invited policy is supplied by the test because configuration activation belongs to step 13; membership, asynchronous preparation, row selection, and final disclosure are production paths. No live Team state was changed. Exact-head hosted CI and ClawSweeper results are recorded below.

Production +120/-27 (+93 net); tests +268/-0. The additional production growth retains physical child ownership so a logical duplicate cannot supply another store's membership.

Actor-only review repair

ClawSweeper's P2 finding on 02dd246396556585c64f726b9e897fb47ba6c48b is repaired. Inventory and linked-child membership now consume the sharing owner's already-resolved principal, including internal.operatorRoleActor.profileId when no authenticated profile is attached. Creator and involving-me attribution are unchanged. The existing inventory regression now runs with both connected-profile and actor-only callers, covering admitted member, unrelated principal, owner, revoked child, revocation during preparation, and buffered enrichment. The actor-only case was red on the previous head ([] instead of parent + child), then green with the repair.

Repair verification: 27 tests in 3 files passed (65.77 s), core typecheck (2.80 s), Gateway-root test types, scoped typed lint (58.37 s), format, and diff checks passed. Independent Codex autoreview of the complete repair plus owning modules was scoped-clean for P0-P2. The previous head's full CI run 40437100573 passed; that is prior-head evidence only. Exact-head verification completed: full CI run 40439910946 succeeded (76 planned jobs, no failures; elapsed 23 min 8 s), CI gate and security review are successful. ClawSweeper reviewed 499bceb23f19b99769018513789c3d7300bdfa12: no findings, no before-merge items; ready for maintainer review. That pre-restack head was non-draft, MERGEABLE and CLEAN. No merge or approval was submitted by RoboClaw.

Original integrated-stack evidence (historical, not exact-head CI)
  • This head passes pnpm tsgo:core.
  • Relevant integrated coverage: Session sharing, list/read-cache, search-scope and row-presentation cases.
  • The complete stack at 344ee8b1dc99 matches the validated source tree: 448 focused tests passed, scoped typed lint, core/UI and affected test/plugin typechecks, formatting, config/i18n baselines, line-cap ratchet and git diff --check. pnpm build:runtime passed, including native protocol generation and the production UI bundle.
  • Independent review of the repaired source found no actionable P0-P2 issues. Trusted local proof used the documented fallback after the remote test host failed DNS resolution.

Production +89/-23 (+66 net); tests +0/-0. Production growth implements the access/transaction owner boundary described above; no parallel membership store is introduced.

These are review drafts. Hosted CI, integration with main newer than 9cf739b6c0da, live Team-server qualification and a latest-stable upgrade exercise are not claimed by this proof.

Supersedes the corresponding slice of #177257.

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@roboclaw-bot
roboclaw-bot merged commit 712a32e into main Oct 27, 2026
141 checks passed
@roboclaw-bot
roboclaw-bot deleted the fix/guest-access-02-inventory-20261026 branch October 27, 2026 10:44
roboclaw-bot pushed a commit that referenced this pull request Oct 27, 2026
## What Problem This Solves

The session-visibility fixture closes shared state before its agent borrowers retire. The conversation-capture fixture targets a stale optional-audit boundary.

## User Impact

Validation prerequisite with no production changes. Teardown uses the existing asynchronous cleanup owners; the audit fixture keeps the durable reply and waiter assertions.

## Why This Change Was Made

- Await agent-state retirement before shared-state cleanup in the session-visibility fixture.
- Fail optional audit append at its actual boundary and reuse canonical capture defaults.
- Regenerate the database worker inventory without changing classifications.

The fixed main already contains the canonical Doctor cleanup, required-terminal-reply and runtime-harness fixture repairs. Their duplicate changes were removed from this PR.

Stack step **3/17**, based on main `5bf0c41a03f1dba03d625460607ed5b959710458`, which includes the merged [session inventory membership](#184495). Next: [retained session reads](#184500). Review and merge in order.

## Evidence

[Current-head CI](https://github.com/openclaw/openclaw/actions/runs/40508436815) passed at `738152457fa4d3b5a8e0025a7f4f90405411eb96`. The [ClawSweeper review](#185780 (comment)) covers the same head and reports no actionable findings or required rank-up moves.

Slice head: `738152457fa4d3b5a8e0025a7f4f90405411eb96`. Before the main rebase, the complete conversation-capture fixture passed **26/26 under Node** and session-visibility fixture passed **9/9 under pinned Bun** in original order. Current-head hosted CI qualifies this prefix.

Canonical worker inventory: **695 non-test files / 2,482 call expressions**. The prerequisite reduces test LOC by two and leaves the test-line ceiling unchanged.

The [stack evidence ledger](#184515 (comment)) distinguishes integrated proof from each prefix's hosted CI.

## Change size

Production **+0/-0**; tests **+22/-24**; generated **+46/-33**. Two test files plus generated documentation.


Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: jalehman <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 28, 2026
…w#184495)

* fix(sessions): apply membership when listing linked sessions

Replay only step 2 onto the merged invitation-only policy. Preserve physical child ownership during membership authorization and add final-disclosure regressions.

Co-authored-by: Vincent Koc <[email protected]>

Co-authored-by: jalehman <[email protected]>

* fix(sessions): use sharing principal for inventory membership

Preserve actor-only autonomous membership checks without changing creator or involving-me attribution.

Co-authored-by: jalehman <[email protected]>

* test(sessions): retain invited collector checks after restack

Qualify membership-aware collector summaries and revocation alongside the unrestricted child-reselection fast path.

Co-authored-by: jalehman <[email protected]>

* fix(sessions): recheck invited membership after revocation

Do not reuse metadata-only filtered partitions for invitation-dependent inventory. Preserve existing cache ownership and unrestricted collector fast paths.

Co-authored-by: jalehman <[email protected]>

* refactor(sessions): share extended row presentation guard

Co-authored-by: jalehman <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: jalehman <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 28, 2026
…85780)

## What Problem This Solves

The session-visibility fixture closes shared state before its agent borrowers retire. The conversation-capture fixture targets a stale optional-audit boundary.

## User Impact

Validation prerequisite with no production changes. Teardown uses the existing asynchronous cleanup owners; the audit fixture keeps the durable reply and waiter assertions.

## Why This Change Was Made

- Await agent-state retirement before shared-state cleanup in the session-visibility fixture.
- Fail optional audit append at its actual boundary and reuse canonical capture defaults.
- Regenerate the database worker inventory without changing classifications.

The fixed main already contains the canonical Doctor cleanup, required-terminal-reply and runtime-harness fixture repairs. Their duplicate changes were removed from this PR.

Stack step **3/17**, based on main `2a97a1e02a3085cded2db1cb0f971bd99d918252`, which includes the merged [session inventory membership](openclaw#184495). Next: [retained session reads](openclaw#184500). Review and merge in order.

## Evidence

[Current-head CI](https://github.com/openclaw/openclaw/actions/runs/40508436815) passed at `738152457fa4d3b5a8e0025a7f4f90405411eb96`. The [ClawSweeper review](openclaw#185780 (comment)) covers the same head and reports no actionable findings or required rank-up moves.

Slice head: `738152457fa4d3b5a8e0025a7f4f90405411eb96`. Before the main rebase, the complete conversation-capture fixture passed **26/26 under Node** and session-visibility fixture passed **9/9 under pinned Bun** in original order. Current-head hosted CI qualifies this prefix.

Canonical worker inventory: **695 non-test files / 2,482 call expressions**. The prerequisite reduces test LOC by two and leaves the test-line ceiling unchanged.

The [stack evidence ledger](openclaw#184515 (comment)) distinguishes integrated proof from each prefix's hosted CI.

## Change size

Production **+0/-0**; tests **+22/-24**; generated **+46/-33**. Two test files plus generated documentation.


Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: jalehman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants