Repository navigation
Phase 4 idle and wake - #4
Merged
Merged
Conversation
siding status --json gives the stack's url without a restart, and the agent never gives localhost:<port> from the compose file, because siding publishes no ports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Idle stop with Sablier next to siding-proxy, opt-in with setup --idle, the verdict Idle, making room under memory pressure from stacks idle for 5 minutes, and the agent skill's address hints. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sablier ignores depends_on on wake, starts one-off services on every request and needs the network on every proxy start. Phase 4 now makes room under memory pressure by stopping stacks without a request for the idle threshold, reports them as Stopped, and starts them again with siding up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When a new stack does not fit into the budget, up stops other stacks that had no request through the proxy for the idle threshold (5m, setup --idle), longest idle first, and only when that makes it fit. The proxy records router and time per request in its container log. A stopped stack reports the verdict Stopped (exit 2) and is started again by siding up. The skill teaches Stopped, the address from status, and never localhost:<port>. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New spec idle-stop; agent-skill, cli-contract, dev-environment, memory-budget, proxy and stack-status updated. The skill requirement is split in two to stay within the length strict validation allows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Phase 4 (v0.4): when a new stack does not fit into the memory budget,
siding upfirst stops other stacks that nobody requested for a while, and a stopped stack has a verdict of its own.Stacked on #3: the base is
phase-3-snapshots-and-queue. Once #3 is merged, change the base tomain.What changed in the plan
The first proposal stopped stacks after a time without requests and woke them on the next request, with Sablier next to the proxy. The spike in task 1.1, against the pinned Traefik v3.7.16, Sablier 1.10.1 and plugin v1.4.0, found:
depends_onorder.302from the plugin, not an answer from the service.The maintainer dropped Sablier, and the change was revised. The spike's results are in the archived
design.md.What siding does now
upstops other running stacks that had no request through the proxy for the idle threshold. It stops the one idle longest first, and only as many as needed to make the new stack fit. It names each stopped stack on stderr. Nothing is removed.--forceandsetup --idle offskip this.siding setup --idle <duration>|off|defaultchanges it. It is kept as the labeldev.siding.idleonsiding-proxy.RouterNameandStartUTC, never a URL, header or cookie.json-filelogging caps it at 30 MiB. siding reads it through the Engine API, so there is no file of its own and no new container. A proxy from v0.3 keeps no record, soupmakes no room until the nextsiding setupand says so.Stopped: no container runs, every exit code is one of a stop (0, 137 or 143), and at least one service has a route or a healthcheck. Exit code 2, with the hintsiding up --wait. Such a stack is never probed, andstatus --waitends on it at once.siding upstarts the stack again in Compose's order.Stoppedand how to start the stack again, says thatsiding status --jsonholds the stack'surl, and says never to givelocalhost:<port>from the compose file.Specs
idle-stop.agent-skill,cli-contract,dev-environment,memory-budget,proxy,stack-status.openspec/changes/archive/2026-10-29-phase-4-idle-and-wake.Verification
just test: gofmt, vet,go test -race, golangci-lint (0 issues),openspec validate --all --strict.just smoke-stacks: a new end-to-end test makes room with--idle 10sand a small budget. It checks that the stopped stack reportsStopped, that a request to it answers 404, that the proxy's record holds no path or token, and thatup --waitmakes the stack Ready again with its data.bin/mac-test/run.sh, with 15 of 15 checks passing.🤖 Generated with Claude Code