Skip to content

fix(cli): warn that fleet release does not tear down Cloud sandboxes - #1978

Open
NilotpalK wants to merge 1 commit into
AgentWorkforce:mainfrom
NilotpalK:fix/1922-fleet-release-warning
Open

NilotpalK wants to merge 1 commit into
AgentWorkforce:mainfrom
NilotpalK:fix/1922-fleet-release-warning

Conversation

@NilotpalK

@NilotpalK NilotpalK commented Oct 15, 2026 •

Copy link
Copy Markdown

Summary

A successful fleet release dispatch can leave a Cloud/provider sandbox running and incurring cost. Warn on stderr after a dispatched acknowledgement while retaining the existing single JSON document on stdout, including --delete-agent and --delete-agent --wait. This change does not request sandbox teardown.

Fixes #1922.

Adds seven regression tests, one RelayFlow bugfix proof case, a patch changelog entry, and tracked Trail records.

Test Plan

  • Tests added/updated: all 18 release tests pass, including the seven new warning/output/failure regressions.
  • Manual testing completed: ran the production command registration with the default output sinks and a stubbed remote release; separately captured stderr and parsed stdout as exactly one unchanged JSON document.
  • npm run typecheck passes with Git's Unix tools on PATH for the existing build scripts.
  • Changed source/proof files pass Prettier; ESLint reports no errors (existing complexity/depth/error-cause warnings, plus the release handler's complexity increases from 15 to 16).
  • Proof manifest validation and git diff --check pass. The same runner observes bug on exact base c1ffabbc4 and fixed on exact head d4119014e; neither observation is selected from the proof arm.

Validation limits: the complete fleet file has 114 passing tests and one Windows path failure in --checkout keeps cross-repo --cwd inference on the actual checkout while using the explicit project workspace (/workspace-project versus C:\workspace-project). Unchanged base reproduces the same failure with 107 passing tests. The broader Windows suite (npm test --ignore-scripts -- --reporter=json) did not pass: its report records 3,040 passed, 342 failed, and 38 pending tests, and a worker ran out of heap memory. Maintainer validation on Linux remains outstanding. Fork PRs also require a maintainer to reproduce the branch and proof case in the upstream repository before the credential-bearing Cloud proof can run, per the case README.

RelayFlow Proof

  • Change type: bugfix
  • RelayFlow case: 1922-fleet-release-sandbox-warning

Screenshots

Not applicable; CLI warning only.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff


Note

Low Risk
Adds a stderr-only user warning after a successful dispatched release; release semantics, JSON stdout, and sandbox teardown behavior are unchanged.

Overview
fleet release now emits a single stderr warning when the lifecycle API returns status: 'dispatched', telling operators that a sandbox-backed worker’s Cloud/provider sandbox may keep running and incur cost and that fleet release does not tear it down. The existing one JSON document on stdout is unchanged, including with --delete-agent / --wait.

Coverage adds seven CLI regressions, a RelayFlow bugfix proof (1922-fleet-release-sandbox-warning), an Unreleased patch changelog entry, and issue-1922 trajectory metadata.

Reviewed by Cursor Bugbot for commit d411901. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

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: c904515b-2001-4d09-b061-5fb807496c90
📥 Commits

Reviewing files that changed from the base of the PR and between c1ffabb and d411901.

📒 Files selected for processing: 11
  • .agentworkforce/trajectories/issue-1922/compacted/compact_ridr6adoo0go_2026-10-15.json
  • .agentworkforce/trajectories/issue-1922/compacted/compact_ridr6adoo0go_2026-10-15.md
  • .agentworkforce/trajectories/issue-1922/completed/2026-10/traj_fesap23qytsg/compaction.json
  • .agentworkforce/trajectories/issue-1922/completed/2026-10/traj_fesap23qytsg/summary.md
  • .agentworkforce/trajectories/issue-1922/completed/2026-10/traj_fesap23qytsg/trajectory.json
  • CHANGELOG.md
  • packages/cli/src/cli/commands/fleet.test.ts
  • packages/cli/src/cli/commands/fleet.ts
  • tests/relayflows/cases/1922-fleet-release-sandbox-warning/case.json
  • tests/relayflows/cases/1922-fleet-release-sandbox-warning/probe.test.mts
  • tests/relayflows/cases/1922-fleet-release-sandbox-warning/run.mjs

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

📝 Walkthrough

fleet release now warns on stderr when a release is dispatched, while preserving the JSON receipt on stdout. Tests cover other acknowledgement statuses, release errors, and the absence of sandbox deletion.

Changes: Fleet release warning

Layer / File(s) Summary
Dispatch warning and CLI contract
packages/cli/src/cli/commands/fleet.ts, packages/cli/src/cli/commands/fleet.test.ts, CHANGELOG.md
A dispatched release emits one warning that a sandbox may continue running and accruing costs, and that fleet release does not tear it down. Tests cover warning output, other acknowledgement statuses, errors, and the JSON receipt on stdout. The changelog records the warning.
Regression proof and task records
tests/relayflows/cases/1922-fleet-release-sandbox-warning/*, .agentworkforce/trajectories/issue-1922/compacted/*, .agentworkforce/trajectories/issue-1922/completed/2026-10/traj_fesap23qytsg/*
The RelayFlow case probes the CLI output and classifies base and head results. The trajectory records document the task, decision, and validation observations.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to d4119

The change adds a stderr warning for dispatched fleet releases and keeps the JSON receipt on stdout. No concrete merge-blocking risk was identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 4 files. (7 skipped: 7… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Issue [#1922] requires a warning on stderr after a dispatched release, one JSON document on stdout, explicit continuing-cost and no-teardown text, and regression tests. fleet.ts calls deps.warn on…
Out of Scope Changes check Passed The changed source implements only the warning behavior requested by issue [#1922]. The CLI does not add Cloud/provider deletion. The tests and RelayFlow proof verify the warning, stdout contract, fai…
Title check Passed The title clearly and concisely describes the main change: warning that fleet release does not tear down Cloud sandboxes.
Description check Passed The description includes the required Summary, Test Plan, RelayFlow Proof, and Screenshots sections. It describes the behavior, tests, proof case, validation limits, and maintenance requirements.
Full details: Docstring Coverage

Explanation

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

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • 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

A rabbit reads the release note at dawn,
“The sandbox may keep running,” it says.
One warning hops to stderr,
The JSON receipt stays in its place.
No teardown follows the dispatched call,
And carrots are counted before the next hop.

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

@NilotpalK
NilotpalK marked this pull request as ready for review October 15, 2026 20:19

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment on lines +1480 to +1484
if (released.status === 'dispatched') {
deps.warn(
'Release was dispatched. If this worker is sandbox-backed, its Cloud/provider sandbox may keep running and incurring cost; `fleet release` does not tear it down.'
);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Completed releases omit sandbox cost warning

When agents.release returns completed, the CLI omits the sandbox warning despite a successful release. Sandbox-backed workers can keep incurring cost without notice; a pending release dispatched later has the same gap.

Learn more

The workspace lifecycle client passes through release receipts from the server without converting their status. A release can return completed immediately, as shown by the lifecycle test; pending work can also dispatch after this command returns. Neither state triggers the warning, although the release command never calls sandbox deletion.

Example: A sandbox-backed worker receives {status: 'completed'} from the release API. The command prints its receipt and exits without mentioning that the Cloud sandbox can remain running.

Recommended fix: Warn on successful release acknowledgements without requiring the transient dispatched state. For pending receipts, use wording that does not claim dispatch has already occurred; retain the one-document stdout contract.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

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.

cli: warn that fleet release does not tear down Cloud sandboxes

1 participant