Repository navigation
Lifecycle-hook tag emit + --on-idle (#25) - #34
Merged
Merged
Conversation
Emit the spawn:* tags for daemon-enforced lifecycle hooks so an instance spawn-ts launches is honored by a real spored — spawn-ts (browser launcher, no daemon) writes the tags but can't run the behavior itself. - types: LifecycleHooks on LaunchSpec/LaunchInput (pre-stop[+timeout], spot-webhook-url/correlation/timeout, notify-url/platform/command, active-processes). tags.ts: buildHookTags/decodeHookTags (wire-identical to pkg/aws/tags.go); decoded onto ManagedInstance.hooks in both providers. - CLI: --pre-stop/--pre-stop-timeout/--spot-webhook-url/--webhook-correlation/ --notify-url/--notify-platform/--active-processes; status shows them. Dashboard launch form exposes pre-stop + notify. - --on-idle stop|hibernate: modern spelling of --hibernate-on-idle (rejects 'terminate' → --on-complete); both set spawn:hibernate-on-idle. - Align spawn:hibernate-on-idle to the Go tool: emit only when true (absent = default stop). Decode unchanged. Tag-emit only — execution is spored's on the instance; docs say so. 243 tests, tags.ts 100%.
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.
Emits the
spawn:*tags for several daemon-enforced lifecycle features, so an instance spawn-ts launches is honored by a real spored — spawn-ts (a browser launcher, no on-instance daemon) writes the tags but can't run the behavior itself. The honest tag-emit half; docs say so plainly. Closes #25.LifecycleHooksonLaunchSpec/LaunchInput:preStop(+timeout),spotWebhookUrl/webhookCorrelation/webhookTimeout,notifyUrl/notifyPlatform/notifyCommand,activeProcesses.buildHookTags/decodeHookTags— wire-identical topkg/aws/tags.go; decoded ontoManagedInstance.hooksin both providers; shown inspawn status.launchflags (--pre-stop,--pre-stop-timeout,--spot-webhook-url,--webhook-correlation,--notify-url,--notify-platform,--active-processes); the dashboard launch form exposes pre-stop + notify.--on-idle stop|hibernate— the modern spelling of--hibernate-on-idle(rejectsterminate→ points at--on-complete); both map to the samespawn:hibernate-on-idletag.Changed
spawn:hibernate-on-idleis now emitted only when true (matches the Go tool — absent means the default idle action, stop). Decode unchanged; no test asserted the old"false".Note on scope: I confirmed against the Go source that there is no
spawn:on-idlewire tag —--on-idleis a CLI flag that resolves into the existinghibernate-on-idletag. So this adopts the flag ergonomics without inventing a tag spored doesn't read (the roadmap's "adopt spawn:on-idle" was based on the flag deprecation).243 tests (tags.ts 100%), typecheck + build green.