Repository navigation
feat(delivery): fetch changed-file source context for reviews - #12
Merged
Merged
Conversation
REVIEW_REPO_CONTEXT (off by default) fetches the surrounding source of each changed file at the queued head SHA via the GitHub contents API and feeds it to the model as source_context, giving the reviewer real code to verify findings against instead of patches alone. Best-effort and bounded: 20 files, 256KB total, 64KB per file, binary/oversized/unavailable skipped. Falls back cleanly when disabled.
… size _f_add_repo_context stored the full file text even when it exceeded the remaining _CONTEXT_MAX_TOTAL_CHARS, so summed context could run up to a full file (64KB) over the documented 256KB cap. Store only the remaining chars and decrement the budget by what was stored, enforcing the total cap exactly. Adds a regression test that shrinks the caps and asserts total stored context stays within budget.
This was referenced Dec 2, 2026
[P0] Repo-level custom review rules & per-repo config (.pascal/review.toml + .pascal/rules/*.md)
#14
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds optional repo-context to reviews. When
REVIEW_REPO_CONTEXT=true, theworker fetches the surrounding source of each changed file at the queued head
SHA (via the GitHub contents API) and feeds it to the model as
source_context, so findings are verified against real code rather thanpatches alone. The prompt builders already consumed
source_context; thiswires the plumbing in the delivery path.
Why
Competitor gap (feature #3 in the feature-matrix plan): Macroscope, CodeRabbit
and Kodus all review with codebase context beyond the diff. This is the
largest review-quality lever of the P0 batch.
Behavior
64KB per file; binary/oversized/unavailable files are skipped, never fail a
review. Pinned to the queued head SHA, never a moving branch.
.env.example+ README config table.Tests
Full suite: 549 passed, 2 skipped.