fix(sandbox): add a kill switch for the daemon's autosave checkpoint loop - #6666
Merged
Conversation
decocms Bot
pushed a commit
that referenced
this pull request
Aug 28, 2026
PR: #6666 fix(sandbox): add a kill switch for the daemon's autosave checkpoint loop Bump type: patch - @decocms/sandbox (packages/sandbox/package.json): 1.60.0 -> 1.60.1 - deploy/helm/sandbox-env (chart 0.16.30) (deploy/helm/sandbox-env/values.yaml deploy/helm/sandbox-env/Chart.yaml): image.tag/appVersion -> 1.60.1 Deploy-Scope: both
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.
Follows #6664 (autosave checkpointing).
#6664 added a periodic checkpoint loop that runs unattended on every sandbox pod's boot/dispatch path, pushing commits to the user's remote branch every 2 minutes while a run is active. Per this repo's own hardening checklist item 7 ("any change on a boot/install/dispatch hot path gets its own default-off flag"), it shipped with no way to turn it off short of a daemon redeploy. If it ever misbehaves at fleet scale — GitHub rate-limiting many pods pushing on the same cadence, an unwanted checkpoint commit pattern customers object to, a push failure loop — there was no lever to pull.
This adds
AUTOSAVE_DISABLEDas an env-var kill switch: when set (to any non-empty value), the daemon skips creating/starting theAutosaverentirely at boot. Default behavior (unset) is unchanged — autosave still starts exactly as #6664 shipped it.d.autosave.Stop()inshutdown()is already nil-checked, so leavingd.autosavenil when disabled is safe.How to confirm:
cd packages/sandbox/daemon-go && go build ./... && go vet ./...(both clean). SettingAUTOSAVE_DISABLED=1before boot meansd.autosavestays nil andAutosaver.Start()is never called; unset, boot is identical to before this PR.Locally ran:
go build ./...,go vet ./...,gofmt -l main.go(no output) inpackages/sandbox/daemon-go. Full CI covers the rest.Summary by cubic
Adds
AUTOSAVE_DISABLEDas an env-var kill switch for the autosave checkpoint loop added in #6664. Previously the loop ran on every sandbox boot and couldn’t be turned off short of a daemon redeploy; now setting the var to any non-empty value skips creating and starting theAutosaverentirely. Default behavior (unset) is unchanged, and the existing nil-check onStop()covers the disabled path.Written for commit ca65994. Summary will update on new commits.