refactor(gateway): check node dispatch run authority once at caller entry (#201887) Problem: node plugin policy re-checked the calling run's authority several times while one node dispatch ran: before the transport wrapper, after the pairing await, just before the transport, in the final send, inside the approval currentness check, and when deciding whether to attribute the result. When the run's authority closed partway through, a node command that had already started was refused with "agent runtime approval authority closed before node dispatch". Fix: the run is checked once at each caller's entry. node.invoke and terminal go through the Gateway's pre-dispatch admission. Computer transport calls assertInvocationCurrent before the policy, which checks delegated run authority and worker-turn currentness. isCallerRuntimeAuthorityActive and every use are deleted, as is the agent-runtime clause of resolveNodeInvokeRuntimeAuthorityError. Forwarded-approval, plugin, private-owner, session, stream, command, upload and placement-grant checks are unchanged. User impact: a node command that a run has started is no longer refused because the run's authority closed meanwhile. A policy result that arrives after the run ended is now recorded instead of dropped. Proof: entry checks confirmed for each caller; 14 node-dispatch test files including a new late-result attribution case; tsgo and test types; oxlint, format and the lifetime-check, line-cap, session-identity, mock-export and max-lines ratchets; ocx build --dts plus a packed install smoke on the head. Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Current
·
C2
·2026-11
refactor(gateway): check node dispatch run authority once at caller e…
Find Your Interest
Current
·
C2
·2026-11





