Deliberate shutdown sequence

  1. 01 | Active relationshipPlugin is active

    Amp has active capabilities and the ready child is live.

  2. 02 | Amp cleanupCapabilities withdrawn

    Amp removes the plugin from active registries before process disposal. This is not a child unregister message.

  3. 03 | Conditional requestDispose requested

    Only a child that is live, reached readiness, and is not terminally failed receives the dispose RPC.

  4. 04 | Best-effort callbacksAcknowledge or bounded wait

    The child runs registered callbacks and acknowledges. Callback failures may be logged and swallowed. Amp waits for acknowledgement, child exit, or a 3-second timeout.

  5. 05 | If still aliveSIGINT, then another bounded wait

    Amp sends SIGINT and waits up to another 3 seconds.

  6. 06 | If still aliveSIGKILL

    Amp sends SIGKILL only if the child remains alive.

  7. 07 | Final stateChild terminated

    The active relationship is over. This does not guarantee completed in-flight work or released resources.

No guarantee is made about completed in-flight work, resource release, or callback success. A never-ready, terminally-failed, or already-exited child is not sent the dispose request. SIGKILL is conditional, not a normal-shutdown certainty.