ActorTemplate golden snapshot (`GOLDEN_SNAPSHOT_MODE_ENABLED`) never refreshes on SandboxConfig runtime upgrade, pinning new actors to the old runtime or degrading them to ROOTFS cold boot
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go, kubernetes
- Domain
- backend, infrastructure
Research direction
Start in cmd/ateapi/internal/controlapi/template_reconciler.go, especially the periodic scan and goldenSnapshotDone, to trace how a terminal golden status prevents rebuilding after defaultVersion changes. Then follow how actor.go assigns the golden tag and how workflow_resume.go handles an unavailable runtime. Done means a template golden snapshot is rebuilt for the current runtime and new actors restore from it; add or update tests for both runtime-upgrade cases.
Written by the indexing model from the issue text.
Description
Summary & Root Cause
The template reconciler treats "a golden tag exists" as permanently done. The golden tag records no sandbox runtime, and nothing compares the tag's runtime with the pool's current defaultVersion. A SandboxConfig upgrade therefore never re-queues the template (template_reconciler.go:133) or rebuilds the snapshot (:225). Every new actor copies the old tag at create time (actor.go:94). On first wake:
- If the old runtime is still
Enabled, it is in the worker'srestorableRuntimes. The scheduler restores the actor atMEMORYon the old runtime, and every later checkpoint stays on that runtime. - If the old runtime is
Disabled, no worker can restore it, so the resume falls back to a fresh boot without memory state (workflow_resume.go:883).
Affected Code Locations
cmd/ateapi/internal/controlapi/template_reconciler.go:128-138: the periodic scan skips any template whose golden status is terminalcmd/ateapi/internal/controlapi/template_reconciler.go:219-228: the reconcile loop returns as soon asgoldenSnapshotStatus.GetGoldenTag() != nilcmd/ateapi/internal/controlapi/template_reconciler.go:418-422:goldenSnapshotDonereturnsGetGoldenTag() != nil || GetErrorMessage() != ""cmd/ateapi/internal/controlapi/actor.go:91-94:CreateActorfreezestemplate.GetStatus().GetGoldenSnapshotStatus().GetGoldenTag()as the new actor's source tagcmd/ateapi/internal/controlapi/workflow_resume.go:879-888:logRuntimeFallbacklogs the fallback when the assigned worker cannot restore the snapshot's runtime
// goldenSnapshotDone reports whether the golden snapshot build reached a
// terminal state: the snapshot was recorded, or the build failed.
func goldenSnapshotDone(snapshotStatus *ateapi.GoldenSnapshotStatus) bool {
return snapshotStatus.GetGoldenTag() != nil || snapshotStatus.GetErrorMessage() != ""
}
Detailed Reproduction Guide
- Deploy the
counterdemo (its template defaults toGOLDEN_SNAPSHOT_MODE_ENABLED) whileSandboxConfig/gvisor-defaulthasdefaultVersion: v5, and wait for the golden tag:
go run ./cmd/ate-setup deploy demo counter
kubectl ate get actor-templates -a ate-demo-counter
- Case A: set
defaultVersion: v6and keepv5Enabled. Wait until workers advertisedefault_runtime: v6andrestorable_runtimes: [v5], then create and wake a new actor:
kubectl patch sandboxconfig gvisor-default --type=merge -p '{"spec":{"defaultVersion":"v6"}}'
kubectl ate create actor s8-case-a --template counter -a ate-demo-counter
kubectl ate resume actor s8-case-a -a ate-demo-counter
- Case B: set
v5tostate: Disabled(the JSON patch path is the index ofv5inspec.versions). Wait until workers advertise onlyv6, then create and wake another actor:
kubectl patch sandboxconfig gvisor-default --type=json -p '[{"op":"replace","path":"/spec/versions/0/state","value":"Disabled"}]'
kubectl ate create actor s8-v5-disabled-3 --template counter -a ate-demo-counter
kubectl ate resume actor s8-v5-disabled-3 -a ate-demo-counter
kubectl logs -n ate-system deploy/ate-api-server | grep 'cannot restore the snapshot'
Expected vs. Actual Behavior
- Expected: After the pool's default runtime moves from
v5tov6(or at least oncev5isDisabled), the template's golden snapshot is rebuilt onv6. New actors then run onv6and restore from av6MEMORYsnapshot. - Actual: The golden tag never changes. In Case A, every new actor restores and runs on
v5, sodefaultVersion: v6has no effect on new actors of the template. In Case B, every new actor falls back to aROOTFScold boot on first wake. Both persist until theActorTemplateis deleted and recreated.
Observed Output & Logs
{"time":"2026-10-27T00:57:46.261846888Z","level":"WARN","msg":"Assigned worker cannot restore the snapshot's runtime; restoring without memory state","actor":"ate-demo-counter/s8-v5-disabled-3","worker":"counter-68d64789c8-v7qwl","required_runtime":{"sandbox_class":"gvisor","version":{"schema_version":"v1","attributes":[{"key":"architecture","value":"amd64"},{"key":"cpu_features","value":"ac0004002c100800000001210000000f00000800d19f2ffb1f8bfbfffefa3223"},{"key":"sandbox_bundle_hash","value":"sha256:078445e3672a4bad894f713a43f519e50bff3b9b09a257b8b30a1ecc6ebb5b58"}]}},"assigned_runtime":{"sandbox_class":"gvisor","version":{"schema_version":"v1","attributes":[{"key":"architecture","value":"amd64"},{"key":"cpu_features","value":"ac0004002c100800000001210000000f00000800d19f2ffb1f8bfbfffefa3223"},{"key":"sandbox_bundle_hash","value":"sha256:914c887f6c3bb4b2555c3bf9060750736fb2f3c31a9d86b90a75bd86c5a9c90d"}]}},"trace_id":"b161d08155493faccc2c06e83fef3c89","span_id":"44a4ae6c7c53128e","trace_flags":"00"}
{"tag":"18c688e9-cf06-4daf-b494-47e419ccad08","bundle":"sha256:078445e3672a4bad894f713a43f519e50bff3b9b09a257b8b30a1ecc6ebb5b58","snapTime":"2026-10-27T02:20:56.767511441Z"}
{"actor":"s8a","worker":"counter-68d64789c8-zvfc4","assigned_bundle":"sha256:078445e3672a4bad894f713a43f519e50bff3b9b09a257b8b30a1ecc6ebb5b58","seeded_from":"bff50703-2a44-4b20-a6d6-016bfea2eefa"}
{"time":"2026-10-27T02:23:16.14485632Z","msg":"Assigned worker cannot restore the snapshot's runtime; restoring without memory state","actor":"ate-demo-counter/s8b","worker":"counter-68d64789c8-x77zr"}
{"goldenTag":{"atespace":"ate-demo-counter","name":"18c688e9-cf06-4daf-b494-47e419ccad08"},"snapshotTime":"2026-10-27T02:20:56.130180800Z"}
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 676
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 538
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from agent-substrate/substrate
-
Clean up the ko retry testsPossibly taken A pull request linked to this issue is open or already merged. Openarea/dev-infra area/reliability area/tests kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
agent-substrate/substrate#3461 ·
Maintainers usually reply within 1 day
-
egress: drop the empty-provider check in providerCredentialPossibly taken @cloudonly claimed this 5 days ago. Openarea/network kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
agent-substrate/substrate#3428 ·
Maintainers usually reply within 1 day
-
kubectl-ate create actor-template -f <file> fails with useless errorPossibly taken @cloudonly claimed this 6 days ago. Openarea/cli kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
agent-substrate/substrate#3406 ·
Maintainers usually reply within 1 day
-
k8s-credential-provider manifest is missing ate-otel-config envFrom, failing OTLP metric exports to [::1]:4317 / 127.0.0.1:4317 every 60sPossibly taken @ericcurtin claimed this 7 days ago. Openarea/dev-infra area/observability area/security kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
agent-substrate/substrate#3282 ·
Maintainers usually reply within 1 day
-
filecachegc.runPass suppresses eviction logs when FreedBytes < target and consecutiveShortfalls > 3Possibly taken @ericcurtin claimed this 6 days ago. Openarea/node area/observability area/storage kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agent-substrate/substrate#3281 ·
Maintainers usually reply within 1 day
All issues in agent-substrate/substrate
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
masahitojp/mariamem#108 ·
Maintainers usually reply within 1 day
-
[Bug] Pod detail shows CPU usage ten times too high, and throws on decimal memory suffixesPossibly taken @RaphaelFakhri claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 11 days
-
tsuru_app_cname and tsuru_app_router don't handle removal outside terraformPossibly taken @lbarrosby claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
contributor-friendly good-first-issue lang:go
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
irbis-sh/zen-desktop#870 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day