[Feat] Make Auto tool approvals presence-aware - #3116
Merged
Merged
Conversation
Contributor
roomote-roomote
Bot
requested review from
brunobergher,
daniel-lxs and
mrubens
as code owners
September 22, 2026 16:55
roomote-roomote
Bot
force-pushed
the
roomote/auto-approval-allow-deny
branch
from
September 22, 2026 20:09
3ca17b8 to
1e2e46f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Follow-up to #3084 (Automatic approvals), refining #3116 so Auto asks when the session owner can answer and blocks when the owner is away.
What changed
Auto mode now uses the session owner's presence to decide whether a non-routine call should pause or be blocked:
askrule creates the normal pending approval row withautoEvaluation; the approval card explains that Auto flagged the call as risky or could not check it and asked the owner.askrule is answered withreject, the model receives an away-owner tool error with a path to allow the tool from the transcript, and a born-terminalauto_rejectedaudit row records the assessment.isSessionUserPresent({ sessionId, userId })with a bounded lookup. A presence error or timeout is treated as present so an outage does not deny a call while someone is available to answer.deniedto the native reject.auto_rejectedstatus remain unchanged; no migration or new rule shape is introduced.Why this change was made
#3116 correctly preserved the native Ask bridge and terminal Auto denial audit, but its unconditional fail-closed behavior also denied risky calls during a temporary check outage or while a session owner was present to answer. The follow-up review also found that Teams was omitted from the chat-surface exception, which would deny an active Teams owner without posting the approval link.
Impact
The same present-to-ask / absent-to-block policy applies to Fast session calls and task tool approvals. Teams now follows the same path as the other supported chat surfaces: no browser lease is required, and the existing session approval link is posted into the Teams conversation. Manual Always allow, Always ask, Reject, session overrides, expiry, and provider authorization ceilings remain authoritative.
Focused package suites pass: Fast approval coverage (65 tests), task approvals (20), worker relay (10), database approval audit (35), web card/settings (12), and the existing API suite (273 files, 3,170 tests). Root
pnpm lint,pnpm check-types,pnpm check-types:fast, andpnpm knippass; knip reports the existingapps/docsignore configuration hint. The earlier failing Roomote code review check was tied to the Teams omission; the synchronized push retriggered it and it now passes with no code issues found.No live judgment-model smoke run was possible in this sandbox because no reachable judgment backend or connected live integration was configured; the present, absent, unavailable, lookup-failure, and chat-surface paths are covered by focused tests.
Out of scope
Checklist