refactor(gateway): check exec approval authority once at request start (#201812) Problem: the exec approval manager re-checked the requesting run's authority at every step an approval went through: registration, observation, resolve, the store's mutation guard, storage-error recovery, standing-grant retention, and both consumption points. An approval granted while the run was live could then be refused, or silently dropped, at consumption, even though the request that asked for it had already started. Fix: run authority for an approval is checked once, when the approval request starts: the entry checks, the aborted-run check (now right after the run id is derived, so it also covers clients without an agent runtime identity), and the Gateway's pre-dispatch admission. A pending approval whose run ends is still cancelled. That is cleanup driven by the run-closure observer and the signal-closure listeners, without per-call re-validation. The per-step runtime re-checks, the consumption authority callback and the expiry re-validation are deleted. Record ownership, expiry, the consumption CAS, binding and manager-retirement checks are unchanged. forceDenyIfRuntimeAuthorityClosed stays for system-agent reconciliation, which is its own chain. User impact: an approval granted while the run was live is honored by the request that asked for it. A pending approval for an ended run is still cancelled, and a request for an already-aborted run is refused at start. Proof: new regressions (an approval granted before its run ended is consumed once; a request for an already-aborted run is refused); all 22 approval-related test files; tsgo and test types; 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 exec approval authority once at request star…
Find Your Interest
- Colts remove questionable designation for offensive tackle
- Scouting Report: Georgia Tech Yellow Jackets
- Pre-Snap Reads: Devon Witherspoon is earning his keep
- Former Tennessee quarterback will make second start with Eagles
- Eagles News: No major changes coming out of the bye
- Houston Texans vs. Indianapolis Colts: Five things to watch on Thursday Night Football
- Clemson football takes major fall in latest USA TODAY bowl projection
- Week 12 college football odds, storylines: Best bets for LSU-Tennessee and Saturday's other big games
- Eagles News: Zack Baun is a rare bright spot on this team
- It falls on Mike Vrabel to make sure Patriots fight, not fold, without Drake Maye | Karen Guregian
Current
·
C2
·2026-11





