Skip to content

fix(sandbox): add a kill switch for the daemon's autosave checkpoint loop - #6666

Merged
pedrofrxncx merged 1 commit into
mainfrom
fix/autosave-kill-switch
Aug 28, 2026
Merged

fix(sandbox): add a kill switch for the daemon's autosave checkpoint loop#6666
pedrofrxncx merged 1 commit into
mainfrom
fix/autosave-kill-switch

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

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_DISABLED as an env-var kill switch: when set (to any non-empty value), the daemon skips creating/starting the Autosaver entirely at boot. Default behavior (unset) is unchanged — autosave still starts exactly as #6664 shipped it. d.autosave.Stop() in shutdown() is already nil-checked, so leaving d.autosave nil when disabled is safe.

How to confirm: cd packages/sandbox/daemon-go && go build ./... && go vet ./... (both clean). Setting AUTOSAVE_DISABLED=1 before boot means d.autosave stays nil and Autosaver.Start() is never called; unset, boot is identical to before this PR.

Locally ran: go build ./..., go vet ./..., gofmt -l main.go (no output) in packages/sandbox/daemon-go. Full CI covers the rest.


Summary by cubic

Adds AUTOSAVE_DISABLED as 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 the Autosaver entirely. Default behavior (unset) is unchanged, and the existing nil-check on Stop() covers the disabled path.

Written for commit ca65994. Summary will update on new commits.

Review in cubic

@pedrofrxncx
pedrofrxncx merged commit 7d24c76 into main Aug 28, 2026
33 checks passed
@pedrofrxncx
pedrofrxncx deleted the fix/autosave-kill-switch branch August 28, 2026 12:05
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
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.

1 participant