Repository navigation
sandboxd: a missing state for host-only env, kept off disk behind host_env_memory_only - #499
Merged
Merged
Conversation
…t_env_memory_only
…es the upstream check
This was referenced Nov 7, 2026
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.
Closes #492
Closes #493
Closes #494
Closes #495
Closes #496
Closes #498
Part of #489.
What changes
Missing state (#492), always on
missing, which only the node sets.GET /v1/sandboxes/{id}/envshows"missing": trueon such an entry, and the index row (GET /v1/sandboxesand the root by-idGET /v1/sandboxes/{id}) carriesenv_missing.missing, or aguest: falseentry with an empty value, answers 400. A GET sent back as a PUT therefore fails instead of blanking secrets.PATCHwith a value clears an entry'smissing.host_env_memory_only(#493, #494, #496), off by default, restart onlyclaims.jsonand the archive and replica rows storeguest: falseentries without their values, marked missing.PATCH.claims.jsonwithout the values.LimitCORE=0(#495)deploy.mdsays to run sandboxd hosts with swap off or encrypted.Docs (#498)
guest: falseentry over node-levelsecrets[].value_env.sandboxd-api.md,deploy.md,egress.md,security.mdandsdk.mddescribe the missing state and the flag.Go SDK
EnvVar.MissingandSandboxSummary.EnvMissing.Compatibility
guest: falseentry with an empty value now answers 400.egress.mddocumented""as a way to suppress the node's value for a claim; that form is gone. A missing entry blocks the node's value for its secret.host_env_memory_onlyis off.Deployment order
host_env_memory_onlyoff. Only the write validation changes.env_missing(cocoonbox final review #223) to production.host_env_memory_onlyon per node and restart. Every host-only entry on that node is then missing until re-pushed.Do not turn the flag on before step 2, or a restart or wake leaves boxes without their credentials.
Hot path
Tests
New tests:
TestDroppedHostValuesAreMissingAndUnpublishedTestEnvValidate(2 new cases)TestAMissingEntryInjectsNothingAndBlocksTheNodeSecretTestRouteTakesTheClaimThenClassThenPoolUpstream(missing upstream case)TestEnvVerbsForRootOrTheTenantandTestEnvPatchVerb(empty and missing writes answer 400)TestHostEnvMemoryOnlyKeepsValuesOffDiskAndARestartReportsThemMissingTestTurningHostEnvMemoryOnlyOnDropsTheValuesAJournalStillHoldsTestHostEnvMemoryOnlyDropsValuesWhenAClaimHibernatesTestHostEnvMemoryOnlyDropsValuesWhenAnUnconfirmedHibernateIsAdoptedTestFailoverRowsHoldNoHostOnlyValueWhenMemoryOnlyThe flag tests run with the flag both off and on.
Negative controls: removing each of these makes its test fail (12 checks):
missingkept through redaction.Gates
Modules
sandboxdandsdk/go,GOWORK=off, pinned golangci-lint v2.13.2:golangci-lint runon linux and darwin: 0 issues for each module.golangci-lint fmt --diff: clean.asl -forwarder=falseon linux and darwin: no findings.go test -race -count=1 ./...: all packages ok (macOS; CI runs Linux).go vetone2e,mcpandprotocol/wire: ok.