Repository navigation
docs(spec,deploy/sbx): SBX0 idle lifetime follow-ups (#770) - #847
Conversation
…s the idle (rossoctl#770) When the live sbx-settings maximum floors SH_WORKSPACE_IDLE above what the bundles hold (216h bundles under a live 30 d maximum, with a lowered run), the kept line said the idle "would drop" just before the raise refusal said it changes from 216h to 768h. It now says the live sbx-settings sets the idle, so the two lines agree. The setup.sh header no longer reads as if SBX_LOWER_WORKSPACE_IDLE could be "off", and the tests' "first" checks match only the reinstall-first advice, not any log line with the word. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
… caveat (rossoctl#770) The idle-lifetime spec moves to v0.2, implemented in rossoctl#837, rossoctl#842 and rossoctl#843 and shipping in v0.11.0, and records what the build decided (sliding only once the maximum is configured, doctor and sbx env, SBX_MAX_LIFETIME_DAYS=off, a lowered maximum keeping the workers' idle). The registry row reads implemented. The deploy README says to keep deploy/sbx/.generated/workers until a lowered maximum's old value has passed: the kept idle lives only in those bundles. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
ingpaolodettori-dev
left a comment
There was a problem hiding this comment.
Summary
These are follow-ups to #843 and they look good. check_host_idle now tells "the live sbx-settings sets the floor" apart from "the bundles set it". That removes the "would drop" message that contradicted the raise refusal right after it. I traced the 216 h bundles / live 30 d / new 20 d case through the new branch and the change loop, and it ends in the 216h→768h raise refusal, as the new test expects. The two no-bundles cases take the same branch and their tests were updated to match. I have two doc nits in the spec, inline.
Author: pdettori (MEMBER — maintainer)
Areas reviewed: Shell, Docs
Agent/IDE config (.claude/.vscode): none
Commits: 2 commits, all signed-off: yes
CI status: passing (deploy-scripts / deploy-scripts-bash32 pending at drafting)
| - `setup.sh`: `SBX_MAX_LIFETIME_DAYS` is 1–30, default 30, and must be at least `SBX_LIFETIME_DAYS`. | ||
| - `setup.sh`: `SBX_MAX_LIFETIME_DAYS` is 1–30, default 30, and must be at least `SBX_LIFETIME_DAYS`; | ||
| or `off`: no `SH_SANDBOX_MAX_LIFETIME_SECONDS` (no sliding) and the idle of before (`SBX_LIFETIME_DAYS` | ||
| - 48 h), which lets an existing deployment take this `setup.sh` before its hosts can be reinstalled. |
There was a problem hiding this comment.
suggestion: (SBX_LIFETIME_DAYS - 48 h) has the wrong operator. The pre-sliding idle is SBX_LIFETIME_DAYS × 24 + 48 h (216 h at 7 days). This line also starts with - 48 h) after the wrap, which Markdown renders as a nested list item. Suggested fix: (`SBX_LIFETIME_DAYS` × 24 + 48 h), reflowed so no continuation line starts with - .
There was a problem hiding this comment.
Fixed in b418afa. The line now reads "the idle of before, that is SBX_LIFETIME_DAYS × 24 + 48 h (216 h at 7 days)", reflowed so no continuation line starts with an operator. Prettier had turned the wrapped + 48 h) into a - list item.
| v0.11.0, where it is tested; not yet deployed on SBX0. | ||
| v0.2 records what the build decided: the control plane slides deadlines only once | ||
| `SH_SANDBOX_MAX_LIFETIME_SECONDS` is set (§6.1); `doctor`'s check command counts as use (§3.1); | ||
| `sbx env` mints without activity, `sbx token` and `--renew-every` with it (§3.1); |
There was a problem hiding this comment.
nit: These points cite §3.1, but §3.1 itself only covers doctor. It doesn't mention sbx env, sbx token or --renew-every. The lowered-maximum rule is cited as §6.3 but is added only to §6.1. Either add a sentence to each section or drop the extra section references.
There was a problem hiding this comment.
Fixed in b418afa. §3.1 now says sbx env mints with activity: false (it runs no command and prints no token), and that sbx token and --renew-every count because a direct client's Execs run on those tokens. The lowered-maximum point now cites only §6.1, where the rule is.
The off idle reads SBX_LIFETIME_DAYS × 24 + 48 h, reflowed so no line starts with an operator (Markdown rendered "- 48 h" as a list item). §3.1 now says sbx env mints without activity and sbx token / --renew-every with it, as the v0.2 line cites; the lowered-maximum rule is cited as §6.1, where it is. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
ingpaolodettori-dev
left a comment
There was a problem hiding this comment.
Follow-up at b418afa: both items from the 986ffef review are fixed. The §6.1 off idle now reads SBX_LIFETIME_DAYS × 24 + 48 h (216 h at 7 days) with no stray list item. §3.1 now covers sbx env (activity: false, matching cmdEnv in commands.ts) and sbx token / --renew-every (activity mints), and the header cites only §6.1 for the lowered-maximum rule. No new findings; CI is green.
Brings rossoctl#847 (idle lifetime follow-ups: setup.sh names the live maximum when it, not the bundles, keeps the workspace idle; the spec and README notes). No conflicts. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Rong Chang <[email protected]>
Summary
Follow-ups to #770 after #837, #842 and #843 merged. Small changes only.
Spec and registry.
docs/specs/2026-11-16-sbx-idle-lifetime-design.mdmoves to v0.2. Its status is now implemented (feat(control-plane): SBX0 idle lifetime - activity mints slide the deadline (#770) #837, feat(mocactl,sandbox-client): SBX0 idle lifetime - the activity hint and --lifetime (#770) #842, feat(deploy/sbx): SBX0 idle lifetime - SBX_MAX_LIFETIME_DAYS and the workers' idle (#770) #843), shipping in v0.11.0, where it is tested. It records what the build decided:SH_SANDBOX_MAX_LIFETIME_SECONDSis set;doctor's check counts as use;sbx envmints without activity, whilesbx tokenand--renew-everycount;SBX_MAX_LIFETIME_DAYS=off;SBX_LOWER_WORKSPACE_IDLE=1.The registry row reads "implemented (v0.11.0)".
setup.shlog message. When the livesbx-settingsmaximum keeps the idle above what the bundles hold (for example 216 h bundles under a live 30 d maximum, on a run that lowers it), the run used to say the idle "would drop" just before the raise refusal said it changes from 216 h to 768 h. The log now says the livesbx-settingssets the idle, so the two lines agree. A new test covers that case. The two "no bundles" tests now expect the new wording.setup.shheader. It no longer reads as ifSBX_LOWER_WORKSPACE_IDLEcould beoff.Tests. The "first" checks now match only the reinstall-first advice, not any log line that happens to contain the word.
Deploy README caveat. After lowering the maximum, keep
deploy/sbx/.generated/workers/until the old maximum has passed. The kept idle lives only in those bundles, and the livesbx-settingsalready holds the lower maximum.These close the review leftovers from #843's last round.
Test evidence
deploy/sbx/tests/*.test.shpass under macOS/bin/bash3.2.57.setup.test.shpasses 69 tests, including the new case.shellcheck -x -S warningis clean, and prettier is clean.Refs #770
Assisted-By: Claude Code