test: stdio adapter dispatch, owner resolution and local env bootstrap

Cover the stdio adapter: local-mode env bootstrap (OAuth off, API-key gate off,
per-user audit path), missing-env failure, PAT owner resolution, and dispatch
(unknown tool, write-mode policy denial, and the happy path pinning request
context to the PAT owner via the shared registry). Tidy the boundary-test
assertion so ruff and black agree.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-27 11:10:05 +02:00
parent 3392d8f69b
commit 1636ae1501
2 changed files with 142 additions and 3 deletions
+2 -3
View File
@@ -58,7 +58,6 @@ def test_core_does_not_import_fastapi() -> None:
capture_output=True,
text=True,
)
assert result.returncode == 0, (
f"core import boundary violated.\nstdout: {result.stdout}\nstderr: {result.stderr}"
)
detail = f"core import boundary violated.\nstdout: {result.stdout}\nstderr: {result.stderr}"
assert result.returncode == 0, detail
assert "ok" in result.stdout