Skip to content

fix(serverless): volumes settings exit status and zero the saved resume key - #228

Merged
emmmile merged 3 commits into
mainfrom
fix/volumes-settings-exit
Nov 30, 2026
Merged

emmmile merged 3 commits into
mainfrom
fix/volumes-settings-exit

Conversation

@emmmile

@emmmile emmmile commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Two small Shared Volumes fixes.

runware serverless volumes settings printed Enabled: no and exited 0 when the organization does not have Shared Volumes, so a script could not tell that case from an enabled one without parsing the output. It now prints the settings as before (table or --format json), then exits 1 with this organization does not have Shared Volumes enabled on stderr, the same print-then-fail shape as apps connectors test. Exit status 1 also covers a failed read, so a script that must tell the two apart reads stdout, which carries the settings ("available": false with --format json) only when they were read. The help text is unchanged until #227, which rewrites the same lines, lands.

When volumes put resumes an upload, resumePlan.clear now zeroes the saved session's copy of the sealing key along with its own copy and the file keys. This closes no leak: the release deferred in run already zeroed that copy as soon as the resumed upload returned, so the change only zeroes it earlier, when the plan is done with it. A new test fails without the change.

Written with Claude Code (Claude Opus 5.5).

'volumes settings' printed "Enabled: no" and exited 0 for an
organization without Shared Volumes, so a script could not tell the
two cases apart without parsing the output. The command now prints the
settings as before and then returns an error, so it exits 1 with
"this organization does not have Shared Volumes enabled", the same
print-then-fail shape as 'apps connectors test'.
@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. To trigger a review, include coderabbit-review in the PR description. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: af9a23da-5410-421b-a521-40491a2e8b9e

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
  • 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

resumePlan.clear zeroed its own copy of the session sealing key and the
file keys, but left the key held by the saved session it was planned
from, so that copy stayed in memory after the plan was dropped or the
resumed upload finished. clear now zeroes it as well.
@emmmile emmmile changed the title fix(serverless): exit non-zero from volumes settings when not enabled fix(serverless): volumes settings exit status and zero the saved resume key Nov 30, 2026
@emmmile
emmmile marked this pull request as ready for review November 30, 2026 11:14
Copilot AI balanced review requested due to automatic review settings November 30, 2026 11:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block the Shared Volumes exit-behavior and resumed-upload key-cleanup fixes.

No open issues 🎉

What changed in this PR

This PR fixes Shared Volumes command exit behavior and improves in-memory key cleanup after resumed uploads.

Changes:

  • Make volumes settings print settings, then return an error when Shared Volumes is unavailable.
  • Zero the saved session’s sealing key when clearing a resume plan.
  • Add regression tests for both fixes. Command help remains unchanged pending #227.
File Description
internal/​volumes/​put/​resume.go Clear the saved session key alongside the plan’s keys.
internal/​volumes/​put/​resume_test.go Verify both session-key copies are zeroed.
internal/​cmd/​serverless/​volumes_manage.go Return an error after printing settings when Shared Volumes is unavailable.
internal/​cmd/​serverless/​volumes_manage_test.go Verify disabled settings still print before returning an error.

Review effort: Balanced

@leszko leszko 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.

LGTM ✅

@danmrichards danmrichards left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

From Dan Richards's agent (Claude), not Dan Richards.

Added a question and a suggestion. LGTM ✅

Comment thread internal/volumes/put/resume.go Resolved
@emmmile
emmmile merged commit 5b85edd into main Nov 30, 2026
5 checks passed
@emmmile
emmmile deleted the fix/volumes-settings-exit branch November 30, 2026 14:14
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.

4 participants