Skip to content

fix(workspace): preserve detached launch results - #1513

Merged
skevetter merged 2 commits into
mainfrom
codex/microsandbox-launch-polish
Oct 17, 2026
Merged

skevetter merged 2 commits into
mainfrom
codex/microsandbox-launch-polish

Conversation

@skevetter

@skevetter skevetter commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Desktop follows a detached launch task, whose success response reconstructed the container and user but dropped the resolved workspace folder. Preserve the saved substitution-context folder in that response, with existing nil-result compatibility and warnings/recovery metadata intact. The new JSON response regression fails against the old mapper and passes with the fix.

Also use generic container/exec-stream wording in the shared agent-delivery success messages, which are used by external runtimes as well as Kubernetes.

Validation: affected workspace/up package race tests and vet, Windows workspace test compilation, required Linux CLI lint and scoped pre-commit checks. Current-head CI and remote reviews remain required. Local CodeRabbit service-start gating is temporarily waived by the user while unavailable; no local CodeRabbit coverage is claimed.

Closes #1514.

Summary by CodeRabbit

  • New Features
    • Successful task results now include the remote workspace folder when that information is available.

@coderabbitai

coderabbitai Bot commented Oct 16, 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: 6c10d50a-30a8-43b6-8d53-89dddaf06b94
📥 Commits

Reviewing files that changed from the base of the PR and between e961d8f and 1eed3dd.

📒 Files selected for processing: 3
  • cmd/workspace/task.go
  • cmd/workspace/task_test.go
  • pkg/agent/delivery/kubernetes.go

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

Successful task results now include the resolved workspace folder when substitution context is available. Kubernetes delivery success messages now refer to containers instead of pods.

Changes: Task result reporting

Layer / File(s) Summary
Workspace folder in task results
cmd/workspace/task.go, cmd/workspace/task_test.go
The result envelope copies the workspace folder from the substitution context when present. JSON reporting tests cover populated metadata, nil substitution context, and nil result.

Kubernetes delivery log wording

Layer / File(s) Summary
Container delivery success messages
pkg/agent/delivery/kubernetes.go
Success messages for in-container download and exec-stream delivery refer to a container instead of a pod.

Priority: ⬇️ Low

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

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 1eed3

No actionable merge-blocking issue is identified in the supplied changes; the PR is mergeable after normal checks.

Security architecture risk: ⚪ Minimal · up to 1eed3

The change restores workspace-folder metadata already supported by launch results. It preserves identity and recovery metadata without changing permissions or agent-delivery behavior. No introduced or worsened security issue was identified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — The changed output projection copies only the container workspace-folder string from substitution context, not its environment map, local workspace path, or mount and user-namespace settings. Container identity and remote-user selection remain unchanged.

Trust Boundaries and Controls

  • observed — At the inspected output boundary, the workspace-folder value is serialized as a JSON string rather than interpolated into a command or interpreted as an instruction. The new mapping itself adds no filesystem or execution operation.
Pre-merge checks: Passed 4 · Failed 1

Failed 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 3 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed 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: preserving detached workspace launch results.
Linked Issues check Passed Issue #1514 requires detached task reporting to preserve the resolved workspace folder and retain nil-result compatibility and result metadata. resultEnvelopeFrom now copies `ContainerWorkspaceFolde…
Out of Scope Changes check Passed The changes are limited to the linked reporting fix, its regression tests, and the shared agent-delivery success wording described in the PR and issue #1514. The diff does not change workspace setup, …
Full details: Linked Issues check

Explanation

Issue #1514 requires detached task reporting to preserve the resolved workspace folder and retain nil-result compatibility and result metadata. resultEnvelopeFrom now copies ContainerWorkspaceFolder when SubstitutionContext is present and keeps the existing nil-result path, container ID, user, warnings, and recovery fields. TestReportTaskStateJSON_SucceededResult covers the folder, nil substitution context, nil result, metadata, and one-record JSON output. The change also applies the requested generic container and exec-stream wording.

Full details: Out of Scope Changes check

Explanation

The changes are limited to the linked reporting fix, its regression tests, and the shared agent-delivery success wording described in the PR and issue #1514. The diff does not change workspace setup, mounts, providers, defaults, guest commands, configuration, or delivery control flow.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · 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 16, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 1eed3dd
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6ad2b6b373b503b1b68cb440

@netlify

netlify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

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

@skevetter skevetter changed the title fix(agent): use generic delivery diagnostics fix(workspace): preserve detached launch results Oct 16, 2026
@github-actions github-actions Bot added size/m and removed size/xs labels Oct 16, 2026
@skevetter

Copy link
Copy Markdown
Contributor Author

@greptileai review

@greptile-apps

greptile-apps Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Preserves the saved workspace folder in detached launch success responses.

  • Detached task results include the resolved workspace folder.
  • Agent delivery success logs use generic container wording.

Reviews (1) · Last reviewed commit: "fix(workspace): retain detached result w..." · Reviewed by Greptile

@skevetter

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

Please complete a fresh full review while this PR remains draft at exact head 1eed3dd, covering all three changed files: cmd/workspace/task.go, cmd/workspace/task_test.go, and pkg/agent/delivery/kubernetes.go. All applicable current implementation/external checks passed, including all 90 Pull Request jobs; Greptile completed at 5/5 with no actionable findings. Please include current architecture/security and merge-risk assessment of the detached result-envelope mapping, nil compatibility and logging wording, and inspect the complete diff and tests. Use only the included review allowance; do not enable paid usage, modify code or change settings.

@skevetter

Copy link
Copy Markdown
Contributor Author

@coderabbitai Please report the status of the existing manual full-review request #1513 (comment) for exact head 1eed3dd. It was posted at 00:47 UTC and has no acknowledgment or completed review visible at 01:28 UTC. Is it accepted, queued, running, rate-limited, or not received? This is a status clarification only: do not start or duplicate a review while one is pending, and do not enable paid usage or change settings.

@coderabbitai

coderabbitai Bot commented Oct 17, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -uo pipefail
repo="devsy-org/devsy"
sha="1eed3dd5bdf130d1ffa179ab544f63a2b5dff97e"
echo "=== Request comment ==="
gh api "repos/$repo/issues/comments/6227547452" --jq '{id,created_at,updated_at,user:.user.login,body,html_url,reactions}'
echo "=== Current PR head ==="
gh api "repos/$repo/pulls/1513" --jq '{head:.head.sha,draft,state,updated_at}'
echo "=== CodeRabbit issue comments ==="
gh api --paginate "repos/$repo/issues/1513/comments?per_page=100" --jq '.[] | select(.user.login | test("coderabbit";"i")) | {id,created_at,updated_at,body,html_url}'
echo "=== CodeRabbit reviews ==="
gh api --paginate "repos/$repo/pulls/1513/reviews?per_page=100" --jq '.[] | select(.user.login | test("coderabbit";"i")) | {id,submitted_at,state,commit_id,body,html_url}'
echo "=== Check runs for requested head ==="
gh api --paginate "repos/$repo/commits/$sha/check-runs?per_page=100" --jq '.check_runs[] | {name,app:.app.slug,status,conclusion,started_at,completed_at,details_url,output:{title:.output.title,summary:.output.summary}}'
echo "=== Commit statuses for requested head ==="
gh api "repos/$repo/commits/$sha/status" --jq '{state,statuses:[.statuses[] | {context,state,description,created_at,updated_at,target_url}]}'

Length of output: 44657


@skevetter The manual review status is unconfirmed. GitHub shows your request, but it does not show that CodeRabbit accepted or started it.

I checked the request, CodeRabbit comments and reviews, and checks for exact head 1eed3dd5bdf130d1ffa179ab544f63a2b5dff97e:

  • Your request exists at the linked comment, posted on October 17 at 00:47:08 UTC. It has no reactions.
  • The PR remains draft at that exact head.
  • No CodeRabbit acknowledgment or completed review is visible.
  • The CodeRabbit commit status says “Review skipped: draft pull request.” Its timestamp is October 16 at 23:43:53 UTC, before your manual request. It does not establish the outcome of that request.

I cannot access internal dispatch or queue records through the available tools. Therefore, I cannot distinguish accepted, queued, running, rate-limited, or not received by the review service. The lack of an acknowledgment does not prove any one of those states.

CodeRabbit support would need to inspect the original comment ID 6227547452 to establish its processing status.

I did not start or duplicate a review, enable paid usage, or change settings.

You are interacting with an AI system.

@skevetter
skevetter marked this pull request as ready for review October 17, 2026 03:36
@mergify

mergify Bot commented Oct 17, 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 7754c18 into main Oct 17, 2026
112 checks passed
@skevetter
skevetter deleted the codex/microsandbox-launch-polish branch October 17, 2026 03:45
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.

Investigate empty workspace folder in successful MicroSandbox launch result

1 participant