feat: vouch serve fails fast with clear hint when no KB is present - #122
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@plind-junior , review this when you can 🫡 |
05d8376 to
1af9521
Compare
|
@plind-junior , review this if you may.....would really be much obliged |
|
@plind-junior , review time 🫡 |
|
Fix the conflict |
ReviewSummary: The one-liner fix for #95 is correct and minimal — What works
Suggestions
VerdictRequest changes — The core fix is correct and the new test covers the happy/sad path well. The blocking item is the dropped |
All right....I'm on it |
|
@plind-junior , you may review this now |
|
Thanks for the contribution! |
Problem
vouch servein a directory without a.vouch/KB silently startsthe server and then misbehaves — the stdio transport emits confusing
blank-line
Invalid JSONnoise and the JSONL transport errors onevery request. There is no upfront check and no actionable message.
Fix
Call
_load_store()at the top ofserve()before any transport isstarted.
_load_store()already handles theKBNotFoundErrorcaseby printing a clear
run vouch inithint and exiting non-zero, sothe fix is a single line.
A valid KB still starts normally — no behavior change for the happy
path.
Tests
test_serve_fails_fast_without_kb— invokesvouch serve --transport jsonlin a temp directory with no.vouch/KB and asserts exit codeis non-zero and the output contains the
vouch inithint.198 tests pass, 5 deselected.
Fixes #95