Conversation
…dentity fresh
Adds lease.identity.{ios,android} (default reusable). A device records the
policy it was created under. A fresh device serves one lease: its lease end
is a shutdown and a delete, never an erase; a failed delete quarantines it
and quarantine retries the delete. Startup finishes deleting spent devices
left reclaiming or shutdown. Adds the shutdown -> quarantined transition.
Closes #75
doctor --fix moved a shutdown device observed running to ready. For a spent fresh device that stranded it: every delete path selects shutdown, so it sat ungrantable in the warm pool until the idle rules removed it. The fix now skips spent devices. Also folds startup convergence's three copies of the actionable-device filter into one helper. Refs #75
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 #75
What changed
New config
lease.identity.ios/lease.identity.android, defaultreusable. Each device records the policy it was created under.A
freshdevice serves one lease. When the lease ends, Simlock shuts it down, commitsshutdown, then deletes it. It is never erased.mayBeGranted(domain.ts) is the one check that stops a spent device from being granted; the planner, warm pool, quarantine and startup all call it. A failed shutdown or delete emitsdevice.purge-failedwith strategydeleteand quarantines the device; quarantine then retries the delete and never reclaims it. At startup, Simlock deletes spent devices leftreclaimingorshutdown.Spec deviation (agreed in session): the spec says no new transitions, but a failed delete happens in
shutdown, so this addsshutdown → quarantined. A quarantined device counts as running capacity until it is deleted.If a delete fails at startup, the device stays
shutdown. It remains ungrantable, and the next start or the idle delete rule retries it.doctor --fixnever moves a spent device fromshutdowntoready, so its delete still finds it.Completion conditions
pnpm checkpasses. Each new path was broken on purpose and its tests failed.Written by an agent.