Skip to content
Merged
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
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ All notable changes to vouch are documented here. Format follows
- **sandbox docker argv on Windows** (#582): omit `--user uid:gid` when
`os.getuid` / `os.getgid` are unavailable so sandboxed dual-solve no
longer raises `AttributeError` while building the docker command.
- **`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.session_transcript`'s degraded-path test no longer depends on an
ambient KB**: it called `handle_request` against whatever `.vouch/` the
cwd happened to sit under, so it passed on a developer checkout and
failed in CI — where `.vouch/` is gitignored — with an `internal_error`
from `_store()`. it now chdirs into a fixture KB and points both
transcript locators at empty dirs, so the absence it asserts is the
raw transcript's.
- **`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
2 changes: 1 addition & 1 deletion tests/test_session_transcript.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def test_handler_returns_degraded_when_absent(
"id": "3", "method": "kb.session_transcript",
"params": {"session_id": "11111111-1111-1111-1111-111111111111"},
})
assert resp["ok"] is True
assert resp["ok"] is True, resp
assert resp["result"]["available"] is False
Comment on lines +214 to 215

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Assert the missing-transcript reason as well.

available: False also covers unreadable and oversized transcripts, so this test does not verify the intended raw-transcript-absence path. Assert that resp["result"]["reason"] starts with raw transcript not found for session.

Suggested assertion
     assert resp["ok"] is True, resp
     assert resp["result"]["available"] is False
+    assert resp["result"]["reason"].startswith("raw transcript not found for session")
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
assert resp["ok"] is True, resp
assert resp["result"]["available"] is False
assert resp["ok"] is True, resp
assert resp["result"]["available"] is False
assert resp["result"]["reason"].startswith("raw transcript not found for session")
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_session_transcript.py` around lines 214 - 215, Extend the
assertions in the transcript-absence test to verify that
resp["result"]["reason"] starts with “raw transcript not found for session”.
Keep the existing resp["ok"] and available assertions unchanged so the test
specifically distinguishes missing transcripts from other unavailable-transcript
cases.



Expand Down
Loading