mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 01:50:44 +08:00
Extend short TTL reuse to listManagedNe/queryUmeNeInventory to cut list self-loops, and treat short YES/continue as confirmation when a token is pending. Co-authored-by: Cursor <cursoragent@cursor.com>
13 lines
636 B
Python
13 lines
636 B
Python
from __future__ import annotations
|
|
|
|
from runtime.orchestration.security import has_explicit_confirmation_token
|
|
|
|
|
|
def test_whatsapp_yes_confirms_outstanding_token() -> None:
|
|
assert has_explicit_confirmation_token("@bot YES", "abc123")
|
|
assert has_explicit_confirmation_token("YES", "abc123")
|
|
assert has_explicit_confirmation_token("please continue", "abc123")
|
|
assert has_explicit_confirmation_token("确认", "abc123")
|
|
assert not has_explicit_confirmation_token("YES", None)
|
|
assert not has_explicit_confirmation_token("maybe later", "abc123")
|
|
assert has_explicit_confirmation_token("confirm abc123", "abc123")
|