engine: reschedule node-scoped actions to the owning provider, not the broker
What this is
When a node hosting an invoked node-scoped action dies, the crash-recovery reschedule dispatches the action to the provider that owns it on the chosen fallback node, instead of the node's default (broker) provider.
Why
rescheduleNodeInvocation's generic-placement branch called dispatchNodeInvocation with no providerName. On a multi-provider node that routes via sendToNode → defaultProviderName, which returns the default (broker) provider. The broker rejects a node-scoped action with handler_unavailable, so the invocation loops between nodes and never completes.
Concretely: a node-scoped work action invoked on node-a; node-a is lost; the engine reschedules work to node-b, which hosts both a broker and a fleet provider — the reschedule went to node-b's broker and was rejected.
The initial-invoke path (invokeNodeAction/invokeAction) and the agent-target reschedule branch already resolve their provider; only the generic-placement branch omitted it.
Change
Resolve the chosen node's action row with fetchNodeAction and pass its handlerProvider to dispatchNodeInvocation. When there is no node action row (spawn/capacity or a legacy single-socket node), the provider falls back to undefined → the node default, preserving current behavior.
Test
rescheduleNodeProvider.test.ts: work owned by a fleet provider on node-a; node-b is multi-provider (broker + fleet owning work); invoke on node-a, lose node-a, reschedule — asserts the dispatch reaches node-b's fleet provider and not its broker. Verified to fail without the fix.
Refs #250.
🤖 Generated with Claude Code