Skip to content

Lifecycle-tag emit: pre-stop, spot-webhook, notify, active-processes, on-idle #25

Closed

Description

@scttfrdmn

Emit the spawn:* tags for several daemon-enforced lifecycle features, so an instance spawn-ts launches is honored by a real spored even though spawn-ts (a browser launcher, no daemon/IMDS/node shell) can't run the behavior itself. This is the honest "tag-emit" half — wire-compatibility without over-promising in-app execution.

Tags / Go source

  • pre-stop: spawn:pre-stop (+spawn:pre-stop-timeout) — hook run on-instance before a lifecycle stop/terminate. pkg/agent/agent.go runPreStop(), flags cmd/launch_flags.go:227-228.
  • spot-interruption webhook: spawn:spot-webhook-url / spawn:webhook-correlation / spawn:webhook-timeout. pkg/agent/agent.go emitSpotInterruptionWebhook().
  • notify: spawn:notify-* (Slack/Teams/Discord lifecycle events). pkg/agent/notifier.go.
  • active-processes: spawn:active-processes — prevent idle-stop while named processes run. cmd/launch_flags.go:224.
  • on-idle: spawn:on-idle (stop|hibernate) — supersedes the deprecated hibernate-on-idle that spawn-ts currently writes.

Browser feasibility

Tag-emit only. Execution needs the on-node daemon. Docs must say so plainly.

Acceptance

  • LaunchSpec + buildLaunchTags (src/core/tags.ts) extended with these fields → correct tags (round-trip tests, mirror src/core/tags.test.ts).
  • Adopt spawn:on-idle: write it alongside hibernate-on-idle, and have decodeConfigTags read either (back-compat) — prefer on-idle.
  • Dashboard exposes pre-stop command + notify inputs.
  • Docs (docs/lifecycle.md or a new note) state clearly: enforced by spored on the instance, not in-browser.

Size: medium.

Activity

  1. added
    area: aws
    on Jul 21, 2026
  2. added a commit that references this issue on Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: aws

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions