fix: resolve remaining 4 CI test failures (#9543)
- test_auth_commands: suppress _seed_from_singletons auto-seeding that adds extra credentials from CI env (same pattern as nearby tests) - test_interrupt: clear stale _interrupted_threads set to prevent thread ident reuse from prior tests in same xdist worker - test_code_execution: add watch_patterns to _BLOCKED_TERMINAL_PARAMS to match production _TERMINAL_BLOCKED_PARAMS
This commit is contained in:
@@ -238,6 +238,10 @@ def test_auth_remove_reindexes_priorities(tmp_path, monkeypatch):
|
||||
|
||||
def test_auth_remove_accepts_label_target(tmp_path, monkeypatch):
|
||||
monkeypatch.setenv("HERMES_HOME", str(tmp_path / "hermes"))
|
||||
monkeypatch.setattr(
|
||||
"agent.credential_pool._seed_from_singletons",
|
||||
lambda provider, entries: (False, set()),
|
||||
)
|
||||
_write_auth_store(
|
||||
tmp_path,
|
||||
{
|
||||
@@ -281,6 +285,10 @@ def test_auth_remove_accepts_label_target(tmp_path, monkeypatch):
|
||||
|
||||
def test_auth_remove_prefers_exact_numeric_label_over_index(tmp_path, monkeypatch):
|
||||
monkeypatch.setenv("HERMES_HOME", str(tmp_path / "hermes"))
|
||||
monkeypatch.setattr(
|
||||
"agent.credential_pool._seed_from_singletons",
|
||||
lambda provider, entries: (False, set()),
|
||||
)
|
||||
_write_auth_store(
|
||||
tmp_path,
|
||||
{
|
||||
|
||||
@@ -380,7 +380,7 @@ class TestStubSchemaDrift(unittest.TestCase):
|
||||
# Parameters that are internal (injected by the handler, not user-facing)
|
||||
_INTERNAL_PARAMS = {"task_id", "user_task"}
|
||||
# Parameters intentionally blocked in the sandbox
|
||||
_BLOCKED_TERMINAL_PARAMS = {"background", "pty", "notify_on_complete"}
|
||||
_BLOCKED_TERMINAL_PARAMS = {"background", "pty", "notify_on_complete", "watch_patterns"}
|
||||
|
||||
def test_stubs_cover_all_schema_params(self):
|
||||
"""Every user-facing parameter in the real schema must appear in the
|
||||
|
||||
@@ -29,8 +29,11 @@ class TestInterruptModule:
|
||||
|
||||
def test_thread_safety(self):
|
||||
"""Set from one thread targeting another thread's ident."""
|
||||
from tools.interrupt import set_interrupt, is_interrupted
|
||||
from tools.interrupt import set_interrupt, is_interrupted, _interrupted_threads, _lock
|
||||
set_interrupt(False)
|
||||
# Clear any stale thread idents left by prior tests in this worker.
|
||||
with _lock:
|
||||
_interrupted_threads.clear()
|
||||
|
||||
seen = {"value": False}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user