Repository navigation
AI Execution Governance, Part 10: Can Revocation Stop a Call That Is Already Running? #92
rain6fish
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
A tool call has passed the gate and is running. Now the role is revoked.
Does it stop, or does it finish?
Ours finishes. Revocation governs the next call, not this one.
That is not the intent of the design; it is what the current implementation does. Three things follow: what each of the three "undo" acts actually stops, when the gate takes effect, and what would have to be added for a call to be stoppable. If the first sentence is enough, the rest can be skipped.
1. Three "undo" acts are not one
Collapse them into one word and the usual false sentence appears: "it is revoked, so it stopped." What stopped may have been only the next call.
2. When the gate takes effect
The write path runs four checks at the execution entry:
The third applies only to writes that carry a confirmation artifact. An automatic write with no artifact is not subject to it.
All four run before the tool's own code starts. The role is read from the database on every call, so a revocation takes effect on the next call immediately. For the call that has already entered, there is no second look.
It also means revocation during the confirmation or approval wait is effective: the four checks run again before the tool actually executes. Revocation stops being able to stop the call only once
executehas begun.In the same system, the model HTTP path does have a ceiling: the proxy aborts the request with
AbortControllerwhen it times out. The tool execution path has nothing equivalent. The two paths do not share a boundary, and that is not a typo.3. Three gaps
execute(args, userId). No signal, no abort.AbortController, noPromise.race, no timeout.Together: there is no kill switch today.
One boundary worth stating: the module does contain other timeouts — one around evaluation batches, one around probing an external tool's status — but neither sits on the tool execution path. They cannot stand in for the missing one.
4. What it would take
Two options, or both.
A cancellation contract. The tool signature takes a signal; a long call that is aborted returns "aborted", and the side-effect ledger records "aborted" rather than "executed". Passing the signal is the easy part. The hard part is that after an abort the ledger has to say what the target actually did.
A bounded window. Local tools take milliseconds; calls that leave the system get a ceiling, and anything past it is
unknown, not success. This one does not require changing every tool signature, but it does require every outbound call to share the same ceiling.Either option can be written as an acceptance check that can fail: revoke a role during a long call and the call is aborted, with the ledger recording an abort; exceed the window and the conclusion is
unknown, never success.Three questions for your own system:
5. Three limits
Closing
Revocation is an act on a permission. Cancellation is an act on an execution. Treating the first as the second is how you discover, at the moment you most need to stop, that nothing stops.
What we can honestly deliver is the ledger: a call that finishes is still recorded, and can be revoked or compensated afterwards. That is weaker than stopping it, but it is not the sentence "already revoked".
The implementation described here comes from the open-source project KeelBase:
Drafted with an AI assistant. The system, the positions and the mistakes are mine.
All reactions