Repository navigation
Fix spored systemd unit → self-terminates on TTL (closes #2, #19) - #20
Merged
Merged
Conversation
…closes #2) The unit ran `ExecStart=/usr/local/bin/spored run`, but the daemon is the BARE `spored` invocation — `run` is not a subcommand, so spored exited non-zero and the unit crash-looped (Restart), never enforcing the TTL. This was the sole reason the prior live run didn't self-terminate. Made the instance side byte-for-byte the Go bootstrap's unit (no reinvention): Type=simple, Environment=SPORE_DNS_SIGV4=1, ExecStart=/usr/local/bin/spored, Restart=on-failure, RestartSec=10, TimeoutStopSec=30, journal output, NoNewPrivileges; enable + start (not enable --now). Validated on real AWS: t4g.nano, 5-min TTL, us-east-1, spored-instance-profile → stayed running to the deadline, then spored self-terminated it ~35s later, unattended. Leak-checked clean. The self-termination guarantee now holds on real AWS end-to-end. 194 tests.
This was referenced Jul 21, 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.
The sole reason the prior live run didn't self-terminate: the systemd unit ran
ExecStart=/usr/local/bin/spored run, but the spored daemon is the baresporedinvocation —runisn't a subcommand, so spored exited non-zero and the unit crash-looped (Restart), never enforcing the TTL.Fix
Made the instance side byte-for-byte identical to the Go bootstrap's unit (
pkg/launcher/bootstrap.go) — no reinvention:Type=simple·Environment=SPORE_DNS_SIGV4=1·ExecStart=/usr/local/bin/spored·Restart=on-failure·RestartSec=10·TimeoutStopSec=30· journal output ·NoNewPrivileges;enable+start.(We still use the actual spored binary, downloaded the same way Go's launcher resolves it — the only intentional divergence remains the browser-side download source, already matched to Go's S3 scheme.)
Validated on real AWS
t4g.nano, us-east-1,
spored-instance-profile, 5-min TTL → stayedrunningto the deadline, then spored self-terminated it ~35s later, unattended:Confirmed
terminated, no leaked instances/volumes. The self-termination guarantee — the whole point of spawn — now holds on real AWS end-to-end, not just substrate.194 tests, typecheck + build green. Closes #2 and #19.