Skip to content

fix(driver): forward external workspace identity - #1411

Merged
skevetter merged 2 commits into
mainfrom
codex/external-runtime-workspace-identity
Oct 7, 2026
Merged

skevetter merged 2 commits into
mainfrom
codex/external-runtime-workspace-identity

Conversation

@skevetter

@skevetter skevetter commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

External runtimes currently receive the container process user but lose the resolved developer identity and Dockerless provisioning mode. This forwards RemoteUser and Dockerless unchanged in RunImage, allowing the runtime to distinguish process execution from workspace ownership before provisioning.

Updates the Runtime SDK dependency to v1.4.0 (Runtime API 1.1), documents ownership intent in the provider protocol reference, and exercises named, numeric, and empty identities through a real runtime subprocess. The regenerated license report also corrects the existing shell-parser version to match go.mod.

Validation:

  • Race-enabled tests for external runtime host, driver factory, Dev Container runner, and agent delivery
  • Go vet for those packages
  • task cli:lint:ci, affected-file prek, and task cli:licenses:check
  • Local CodeRabbit review: no findings

Summary by CodeRabbit

  • New Features
    • Workspace identity information is now passed through the runtime, supporting ownership and mount-ownership checks for remote users and Dockerless workspaces.
  • Documentation
    • Updated the runtime protocol documentation to describe workspace identity fields and clarify that they do not permit replacing an existing workspace.
  • Chores
    • Updated runtime SDK and shell dependency versions.

@netlify

netlify Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit dfb95aa
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6ac6654c64dc6f0008966d3c

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5b7daafa-aaf0-40e1-99a3-960b32f38b04
📥 Commits

Reviewing files that changed from the base of the PR and between ae5c671 and dfb95aa.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (7)
  • THIRD_PARTY_LICENSES.md
  • go.mod
  • pkg/driver/external/internal/testfixture/main.go
  • pkg/driver/external/run_image.go
  • pkg/driver/external/run_image_test.go
  • pkg/driver/external/workspace_identity_test.go
  • sites/docs-devsy-sh/content/docs/developing-providers/runtime-protocol.mdx

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

The external runtime driver now forwards remote-user and dockerless values in runtime requests. Fixture labels and tests cover workspace identity configurations. The protocol documentation describes ownership precedence and related validation requirements.

Changes

Workspace identity propagation

Layer / File(s) Summary
Document and verify workspace identity propagation
go.mod, THIRD_PARTY_LICENSES.md, pkg/driver/external/run_image.go, pkg/driver/external/internal/testfixture/main.go, pkg/driver/external/run_image_test.go, pkg/driver/external/workspace_identity_test.go, sites/docs-devsy-sh/content/docs/developing-providers/runtime-protocol.mdx
The runtime SDK version changes to v1.4.0. The driver forwards remote-user and dockerless values to runtime requests, and the fixture exposes them as labels. Tests cover request fields and workspace identity configurations. The protocol documentation updates the Info API minor version and describes workspace ownership rules. The mvdan.cc/sh/v3 license listing changes to v3.14.1.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to dfb95

No specific issue remains that needs resolution before merge; complete the normal checks.

Security Architecture Review

Security architecture risk: 🔵 Low · up to dfb95

This change preserves the distinction between the account running a container and the account owning workspace files. No concrete security regression was established, but ownership enforcement and recovery depend on external runtime behavior that could not be verified here.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — Configuration-controlled developer identity now reaches the external runtime's workspace-ownership decision. The relevant assets are workspace files and resources that the selected runtime can mutate. Maximum filesystem or cross-workspace exposure depends on that runtime's privileges and isolation, which are not established by the available consumer evidence.

Trust Boundaries and Controls

  • observed — The protocol treats the runtime executable as trusted provider code, not a sandboxed untrusted extension. The host resolves a provider-declared binary, checks relative-path containment, validates Info through the SDK and restricts transport to gRPC. These controls do not prove that a runtime safely interprets configuration-derived ownership intent.

Resilience and Maintainability Implications

  • observed — The host validates before RunImage, binds session cleanup to caller cancellation and makes deletion of an absent workspace succeed. These are concrete host-side containment controls; they do not demonstrate atomic ownership changes or recovery of persistent resources after a partially completed provisioning operation.

Hardening Proposals

  • proposed — When a production runtime consumer is available, verify the ownership contract with conformance cases covering an identity absent from a Dockerless image, existing-workspace protection, repeated and concurrent provisioning, and cancellation or restart between ownership resolution and resource mutation. This would close the downstream evidence gap without treating the current label round-trip as ownership enforcement.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. (3 skipped: 3 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: forwarding external workspace identity through the driver.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@netlify

netlify Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit dfb95aa
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6ac6654ce5d9c10007aac7a2

@github-actions github-actions Bot added the size/m label Oct 7, 2026
@skevetter
skevetter marked this pull request as ready for review October 7, 2026 16:37
@mergify

mergify Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@skevetter
skevetter merged commit da8c894 into main Oct 7, 2026
93 checks passed
@skevetter
skevetter deleted the codex/external-runtime-workspace-identity branch October 7, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant