Semantic visualization prototype | Section 8
Ending the relationship cleanly.
Disposal is a deliberate closing phase. Termination ends the child process. The verified path is ordered, conditional, and bounded.
Acceptance scene
Amp withdraws capabilities before disposal. The dispose RPC is conditional, callbacks are best-effort, and stronger signals appear only when the child remains alive.
Deliberate shutdown sequence
- 01 | Active relationshipPlugin is active
Amp has active capabilities and the ready child is live.
- 02 | Amp cleanupCapabilities withdrawn
Amp removes the plugin from active registries before process disposal. This is not a child unregister message.
- 03 | Conditional requestDispose requested
Only a child that is live, reached readiness, and is not terminally failed receives the dispose RPC.
- 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.
- 05 | If still aliveSIGINT, then another bounded wait
Amp sends SIGINT and waits up to another 3 seconds.
- 06 | If still aliveSIGKILL
Amp sends SIGKILL only if the child remains alive.
- 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.
Phase 1 of 7: Active relationship