Repository navigation
feat(openclaw-id): guest member role with sandboxed session tools - #197748
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: blocked before merge. What this changesThis PR adds a Guest membership preset and carries its required sandbox policy through session creation, execution, scheduling, and recovery. Example: A Guest member creates agent:main:guest-work while the agent's sandbox mode is off.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep this maintainer-directed feature open; Guest invitation is incomplete, and the explicitly unresolved execution-boundary choice needs an owner decision. Priority: P2 Decision needed
Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Gateway resolves authenticated membership into role policy, stamps new sessions, and passes that isolation requirement to existing session, automation, and agent execution owners. flowchart TD
A[Authenticated member] --> B[Membership role definition]
B --> C[Session creation provenance]
C --> D[Session sandbox stamp]
B --> E[Run admission]
D --> E
E --> F[Session exec and file tools]
D --> G[Children and recovered work]
Technical reviewBest possible solution: Complete Guest invitation through the existing picker and preserve membership-derived sandbox stamps under an explicitly chosen execution boundary. Do we have a high-confidence way to reproduce the issue? Source inspection establishes that Access cannot select Guest: its picker offers only Operator and Viewer and coerces other values to Operator; no target code or tests were executed. Is this the best way to solve the issue? Reusing membership authority, creation provenance, and existing sandbox admission is a coherent minimal implementation, but the invitation consumer must be completed. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8864d2764ded. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +132, Tests +626, Docs +56, Other +4. Total +818 across 33 files. Added test files: 3. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes: No label 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 Reviewed November 12, 2026, 8:36 AM ET / 13:36 UTC. |
ec6da85 to
2b648ec
Compare
cbb2ca1 to
a9aac82
Compare
8d8aa19 to
536bf87
Compare
5537a5b to
5d1cb61
Compare
5d1cb61 to
bfc792e
Compare
|
|
Live proof covered two heads on separate disposable staging claws. At At The removal gap is now closed. I dry-ran exact selectors, removed Guest through Access and confirmed the action. Access reported two connections closed. The held Guest connection closed, reconnect was denied by the relay as unauthorized, and Operator's existing connection and subsequent RPCs continued working. Scheduled work remains a live-proof limitation: both Guest and Operator were refused direct Docker was already available, but both runs prove sandbox admission—not model/tool execution inside a container. No model run or container provisioning was attempted. Cleanup is complete for both runs: each disposable claw was retired with all four database counts verified zero, all test-account sessions were revoked and verified signed out, and isolated processes, ports, checkouts, state, logs and recovery kits were removed. No task containers remain. Note on the head: the PR head is now |
b3c7d20 to
abe84f6
Compare
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…enclaw#197748) * feat: add sandbox-required OpenClaw ID guest members * docs: clarify member sandbox boundaries and proof * refactor(gateway): reconcile restacked operator run authority * fix(cron): reject undecodable scheduled authority safely * fix(cron): permanently refuse undecodable isolated authority * fix(cron): retire revoked member sources before session creation * test(openclaw-id): adapt guest fixtures to private presets * test(openclaw-id): align rebased authority refusal fixtures
What Problem This Solves
OpenClaw ID members are either Operators, whose sessions run tools on the Gateway host, or Viewers, who cannot start work. An owner has no role for someone who should be able to work with the session's tools kept in a sandbox.
User Impact
User impact: turning on OpenClaw ID also writes a
guestrole definition. A guest member reads shared sessions and starts their own work, and the exec and file tools of their sessions run in a per-person sandbox. Operator stays the default invite role. OpenClaw ID is a Labs feature and is off by default.Important limit: a required sandbox contains a session's exec and file tools only. It does not contain Code Mode under the default
nodeexecutor, CLI backends, or directnode.invokecalls by a role that also hasoperator.writeoroperator.admin. These limits apply to every sandbox-required role, named roles included, and are listed indocs/gateway/operator-scopes.md. With default settings a guest can reach the first two. The maintainer accepted these limits for now; this PR changes none of those paths.A guest needs a Docker or Podman sandbox backend. Without one their runs fail; they never fall back to the host. The invite form does not offer Guest at this head: the role picker arrives in #197770, and until then a Guest is invited through the signed invite RPC. The missing-backend warning in the form therefore only becomes reachable for the stock Guest role with #197770.
Why This Change Was Made
guestpreset issessions.others: "view",agents: "*",scopes: ["operator.sessions.write"],sandbox: "required". It is written with the other presets, only when missing.gateway.roles.default), which is the normal state of a personal claw.Evidence
Not run: a live Docker or Podman model run, a real restart and recovery cycle, the full repository suite.
Six commits before a second rebase. The last three of those fix how this PR's early read of a scheduled job's stored authority classifies refusals, found by CI and by independent reviews of each head:
A review of head
b3c7d200bc3efound no P0-P2.Live proof (isolated Gateway, staging testnet), see the proof comment: checks 1-8 on
bfc792e9f1f9, and setup, sandbox stamp and admission, and removal through Access on0e0d8879feb8. Sandbox evidence is admission only; no tool ran in a container. A member cannot create a scheduled job directly (it needsoperator.admin), so the scheduled-job fixes are covered by unit tests only. Commits after0e0d8879feb8change scheduled-job handling only.Rebased again onto current main (
8b94cfb556c3), which had added existing-person invitations, private preset exports, the member agent ceiling at session creation and per-job Access selection for cron. Production behavior of this PR is unchanged by the rebase; two test-only commits follow it (tests use their own expected-preset fixture; one cron test follows main's changed alert wording). Eight commits. A review of the rebased headabe84f6d062bfound no P0-P2. The live proof predates this rebase.CI on
abe84f6d062b, one failure not from this PR:checks-node-compact-small-1,src/cli/cron-cli/cron-suppression.gateway.test.ts("distinguishes intentional silence from failures across repeated runs of one stored job") readslastDeliveryError, which is undefined. It fails identically on the CI merge base7acc3158247ewithout this PR (3 of 3 runs under Node and under Bun), and this PR does not touch the test. A lint job was also killed by the runner's memory limit on the first attempt; the same lint stripe passes locally on the base and on the merge.