Skip to content

fix(approval): wake blocked gateway approvals on session cleanup#18044

Closed
Yukipukii1 wants to merge 1 commit into
NousResearch:mainfrom
Yukipukii1:fix/approval-session-cleanup
Closed

fix(approval): wake blocked gateway approvals on session cleanup#18044
Yukipukii1 wants to merge 1 commit into
NousResearch:mainfrom
Yukipukii1:fix/approval-session-cleanup

Conversation

@Yukipukii1
Copy link
Copy Markdown
Contributor

Summary

  • wake blocked gateway approval waiters during session-boundary cleanup
  • mark cleared approvals as denied so old runs unwind immediately
  • add regression coverage for both direct approval cleanup and gateway boundary cleanup

Why

clear_session() removed pending gateway approval queues without signaling the blocked waiter events. When /new, /resume, or /branch cleaned session state while a dangerous-command approval was pending, the old run could remain blocked until the approval timeout expired.

Testing

  • tests/gateway/test_approve_deny_commands.py
  • tests/gateway/test_session_boundary_security_state.py

Result:

  • 25 passed

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery labels Apr 30, 2026
@teknium1
Copy link
Copy Markdown
Contributor

teknium1 commented May 1, 2026

Merged via #18171. Your commit was cherry-picked onto current main with authorship preserved in git log (commit 5f3f456). Thanks @Yukipukii1!

@teknium1 teknium1 closed this May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants