Skip to content

feat: allow scoped access to isolated session workers - #177207

Draft
vincentkoc wants to merge 2 commits into
mainfrom
fix/crabbox-session-exec-writer-20261019
Draft

vincentkoc wants to merge 2 commits into
mainfrom
fix/crabbox-session-exec-writer-20261019

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Fixes #177204

What Problem This Solves

Shared-session collaborators currently need gateway-wide administrator access to create, use, and stop an isolated Crabbox worker.

User Impact

Operators can grant operator.workers for the attached-worker lifecycle through existing role definitions and verified GitHub-login mappings. The scope must be present in both the role ceiling and the connection's authenticated scopes; existing identity grants can supply it after reconnect. Ordinary guest and writer permissions stay unchanged.

Providers explicitly opt in eligible isolated targets for delegated access. Crabbox permits AWS, Azure, Daytona, GCP, Hetzner, and Machine0 targets. Administrator behavior, global allocation metadata, sandbox policy, and existing cleanup semantics remain unchanged.

Why This Change Was Made

Delegated callers use current participation, agent and sandbox policy, tool policy, approvals, and revocation checks. A synchronous provider-owned eligibility hook checks the frozen target before delegated effects; active operations also require current dedicated-lease authority. Raw environment administration and dispatch remain administrator-only.

Teardown keeps its existing owner and serialized provider operations. This revision removes the earlier detached allocation lookup and global backend reclassification. The complete change is production +239/-33, tests +649/-16, and docs +65; the production growth implements the scoped permission and its lifecycle boundaries.

Evidence

  • Independent source review passed on the revised candidate. A fresh two-pass autoreview found one administrator-compatibility regression; it was corrected and independently rechecked.
  • Targeted native pinned-Bun formatting, TypeScript syntax-only checks, docs discovery, and git diff --check passed.
  • Added regression coverage for scope and real caller admission, reconnect/revocation, managed provider eligibility, valid execution/process actions, admin behavior, frozen targets, and failed or concurrent teardown. Behavioral tests have not run.
  • Pending: behavioral tests, typecheck/lint, build, protocol generation check, config-doc baseline, and line-cap ratchet. The earlier selected Testbox stayed queued and was stopped before its payload began; this code-only checkout has no qualified test dependencies.
  • No deployment or live worker lifecycle validation. This remains a draft. Draft CI skips behavioral lanes; its green metadata checks do not cover the pending proof.
Focused validation scope

Gateway method scopes and role schema; session caller authority and identity-grant reconnect/revocation; plugin dispatch and managed provider lifetime; session execution/attachment lifecycle; Crabbox tool/provider contracts; session portal targets; existing provider allocation cleanup and provisioning replay tests that protect serialized provision → resolve → destroy ordering.

Add explicit operator.workers admission for attached worker create, execution, process management, and teardown while preserving session policy, live authority, and dedicated allocation fences. Keep raw environment administration restricted and document grants and reconnect requirements.

Fixes #177204
@vincentkoc vincentkoc self-assigned this Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 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 docs Improvements or additions to documentation gateway Gateway runtime extensions: crabbox size: L labels Oct 19, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. 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:feature Preliminary submission classification; full source review pending. labels Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head 655d2c0bc270afb9444723c480a9d6c247ad1f7a, but the PR head is now e692a2097a422cf8867d64ff4e1a76f2c398436d. Its old verdict and PR readiness labels are no longer current.

Next step
Run or wait for a fresh ClawSweeper review on the current PR head.

Review history (1 earlier review cycle)
  • reviewed 2026-10-19T09:49:48.068Z sha 655d2c0 :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation extensions: crabbox gateway Gateway runtime P2 Normal backlog priority with limited blast radius. size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: scoped access to isolated session workers

1 participant