{{ message }}
Repository navigation
Conversation
Add a snapshot: false runner option for steps whose workspace is never restored, such as a final deploy. The Sandbox runner then skips createBackup, the step succeeds without a snapshot, and a chained runner from that result is rejected. The option cannot be combined with cache, which needs the snapshot to publish its pointer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeYiT1pGA6KuTByiQvwt7s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Adds an opt-in
snapshot: falserunner option that skips the workspace backup after a successful command.Motivation
Every successful runner ends with
createBackup()of/workspaceso that a chained runner can restore it. The last runner of a pipeline, typically a deploy step, has nothing chained after it, so its backup is never restored. Producing it still adds a few seconds to the step (for examplebackup.create … (2833ms)after a deploy command in our pipeline), and the archive stays in R2 until its TTL expires.Usage
Behavior
createBackupfor that step, and the step succeeds without a snapshot..runner()on such a result rejects with an error, since there is no workspace to restore.snapshot: falsecombined withcacheis rejected before the step runs, because the cache pointer needs the snapshot.CiRunStepOutput.snapshot(and soCiRunnerResult.snapshot) becomes optional.Tests
Focused tests cover each layer:
runCiStepforwards the option and returns no snapshot;withStepNotificationaccepts a missing snapshot only when none is required;CIWorkflowrejects chaining from an opted-out runner and rejects the combination withcache.Results:
vitest run --dir src: 89 passed; the 5 new tests fail without the change.typecheck,lintandformat:checkpass, with no new lint warnings.Naming
I named the option
snapshot: falseto sit next tocache, and I'm happy to rename or reshape it if you'd prefer another API.