mirror of
https://github.com/agent-substrate/substrate.git
synced 2026-11-10 10:13:50 +08:00
Fixes #794 A crashed actor makes `--delete-all` abort mid-teardown, leaving the ActorTemplate, atespace and `ate-system` behind; the next `--deploy-demo-counter` keeps the existing template, so the cluster goes on serving the stale golden snapshot. `prepare_actor_for_delete` treats `STATUS_CRASHED` as unexpected and returns 1, which errexit turns into a hard abort, even though DeleteActor accepts CRASHED and is idempotent for an actor already marked DELETING (`workflow_delete.go`). Teardown now treats crashed and already-deleting actors as deletable as-is. The demo flag dispatch had the mirror-image defect: handlers ran from an `if` condition, which suppresses errexit for their whole call tree, so this same teardown and failed deploys like the issue's immutable-spec apply exited 0. Handlers now run as plain commands and report an unclaimed flag through `ate_demo_flag_unhandled`; the Jupyter handler follows the same contract. Repro: deploy the counter demo, resume an actor, delete its worker pod, wait for the syncer to mark it `STATUS_CRASHED`, then run `--delete-all`.