Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to vouch are documented here. Format follows
## [Unreleased]

### Fixed
- **`kb.session_transcript` handler test needs a KB** : `test_handler_returns_degraded_when_absent` now chdirs into a temp KB and points Claude/Codex search roots at empty dirs, so the handler can return the degraded payload instead of raising `KBNotFoundError`.
- **`kb.search` excludes retracted claims and archived pages** (#581):
`search_kb` now drops `ARCHIVED` / `SUPERSEDED` / `REDACTED` claims and
`ARCHIVED` pages the same way `kb.context` already does, so lifecycle
Expand Down
10 changes: 9 additions & 1 deletion tests/test_session_transcript.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,17 @@ def test_handler_bad_agent_is_invalid_request() -> None:
assert resp["error"]["code"] == "invalid_request"


def test_handler_returns_degraded_when_absent() -> None:
def test_handler_returns_degraded_when_absent(
store: KBStore, monkeypatch: pytest.MonkeyPatch
) -> None:
from vouch.jsonl_server import handle_request

# handle_request discovers the KB via cwd; point both agent search roots
# at empty dirs so the locator misses and returns the degraded payload.
monkeypatch.chdir(store.root)
monkeypatch.setenv("VOUCH_CLAUDE_PROJECTS_DIR", str(store.kb_dir / "no-claude"))
monkeypatch.setenv("CODEX_HOME", str(store.kb_dir / "no-codex"))

resp = handle_request({
"id": "3", "method": "kb.session_transcript",
"params": {"session_id": "11111111-1111-1111-1111-111111111111"},
Expand Down
Loading