Fix/compile review followup#364
Conversation
a config max_pages: 0 (or --max-pages 0) made cap <= 0, so every draft was dropped with "over max_pages=0" after the LLM run was already spent. raise CompileError up front instead of silently producing nothing.
the unlabeled fence trips markdownlint MD040.
|
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 |
There was a problem hiding this comment.
Pull request overview
This PR tightens compile_kb input validation by rejecting non-positive max_pages values up front (before invoking the LLM), and adds a regression test to lock in that behavior. It also slightly improves the compile documentation’s diagram code fence formatting.
Changes:
- Add an explicit guard in
compile_kbto raiseCompileErrorwhenmax_pages < 1. - Add a unit test asserting
max_pages=0fails before any LLM execution is attempted. - Adjust
docs/compile.mdto use a typed code fence for the ASCII diagram.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/test_compile.py | Adds coverage ensuring non-positive max_pages is rejected early. |
| src/vouch/compile.py | Validates max_pages is at least 1 and raises a clear CompileError otherwise. |
| docs/compile.md | Tweaks the diagram code fence to ````text` for clearer rendering/intent. |
What changed
Why
What might break
VEP
Tests
make checkpasses locally (lint + mypy + pytest)CHANGELOG.mdupdated under## [Unreleased]