Skip to content

Expose attach subpaths and sandbox readonly requests (spawn contract pending) - #1787

Draft
agent-relay-code[bot] wants to merge 3 commits into
mainfrom
relayflow/relay-software-garden-139d1a46
Draft

agent-relay-code[bot] wants to merge 3 commits into
mainfrom
relayflow/relay-software-garden-139d1a46

Conversation

@agent-relay-code

@agent-relay-code agent-relay-code Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Draft implementation of the attach and read-only-request portions of the workforce#338 upstream work. This does not yet unblock workforce#338. The reviewed plan's D4 decision is pending: spawnFleetSandbox must either orchestrate a running agent or expose a narrower ensure-only contract. No placeholder spawnFleetSandbox is exported.

  • Move the attach adapter and workspace transport resolution into Cloud, retaining CLI re-exports and existing broker transport fields. Add Cloud and SDK /attach entries, nodeId/optional-agent discovery, a private single-client raw stdio socket, idempotent cleanup, and a completion promise.
  • Expose existing provisioning primitives through Cloud and SDK /fleet; route the CLI's ensure import through the SDK entry. Preserve existing Cloud enrollment APIs. The running-agent spawn wrapper remains pending D4.
  • Validate and forward readonlyPaths as explicit /path/** subtrees; expose fleet spawn --sandbox-readonly-path with mount guards.
  • Add socket, request-validation, CLI, and built-entry regression coverage. Add an independent read-only-request RelayFlow proof; leave historical case 1630 unchanged.

The proxy retains broker transport fields alongside socketPath/finished/close, as the reviewed plan recommends: workforce duck-types the three consumer fields and ignores extras. Completion is an inferred status (0 for normal terminal closure/detach, 1 for transport failure), not a remote harness exit code. SDK re-exports add a dependency on Cloud and its transitive dependencies. No package versions changed.

Remaining requirements

  • Resolve reviewed-plan.md D4 and implement/test spawnFleetSandbox registration, placement confirmation, input mapping, and teardown.
  • Cloud's server-side ensure handler/mount builder is absent from this repository. Forwarding does not enforce chmod-444; server implementation and a live Daytona write-denial proof are still required.
  • Exports follow the reviewed plan's existing ESM conventions. No CommonJS build or require condition was added.
  • No live CLI sandbox-spawn or node-attach parity run was performed.

Validation

  • npm run typecheck: passed.
  • npm run build: passed (Rust build skipped automatically because Cargo is unavailable).
  • SDK suite: 182 passed; fleet suite: 43 passed.
  • Cloud suite: 450 passed, 4 skipped after removing inherited Cloud authentication variables.
  • Existing and new attach tests: 42 passed, using actual local WebSocket and UNIX socket servers.
  • CLI suite via npx vitest run packages/cli/ --maxWorkers=2: 1,652 passed, 29 skipped. npm --prefix packages/cli test is unavailable because that package has no test script. Tests ran without inherited Cloud/Relay credentials and with local Git file transport enabled for the temporary-repository fixture.
  • Built Cloud/SDK entry-resolution regression: passed.
  • New proof runner executed locally against base c978302 and implementation b6c3bb1: base absent, head fixed. Both generated probes and compiled CLI-help checks passed. This was not a hosted Cloud or live Daytona run.

RelayFlow Proof

  • Change type: feature
  • RelayFlow case: sandbox-readonly-paths

This generated base/head probe verifies exact request forwarding and compiled CLI help. It does not provision a sandbox or prove chmod enforcement.

Review in cubic

@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 154105a4-e8a7-4dda-bd62-fd75e31004fd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants