feat(bot): natural-language pre-merge checks (Phase 5) - #28
Merged
Conversation
Signed-off-by: Lohit Kolluri <lohitkolluri@gmail.com>
CodasaurusThis PR updates 7 files across Changes
All files (7)
|
ContextBlast radiusSensitive path: Blast detailsHigh-sensitivity paths:
Bounded estimate from PR imports only. Related pull requests
|
ChecksAll clear. Automated checks did not find anything to fix before merge. CommandsType as plain text (GitHub Apps are not @-mentionable):
Full list: |
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 configurable natural-language pre-merge checks: per-repo
[[pre_merge.checks]]entries (name, mode off|warning|error, optional scope glob, instructions) evaluated by the BYOK LLM against the PR diff.How
src/bot/premerge.rs:run_pre_merge_checks— scope-filtered, offline fail-closed (inconclusive never blocks), persists each run topre_merge_check_runssrc/llm/mod.rs:premerge_check— strict two-line output contract (PASSED/FAILED/INCONCLUSIVE + reasoning), diff truncated to 20k chars, untrusted-content delimiterssrc/config.rs:PreMergeCheck+checksonPreMergeConfigsrc/db/migrations.rs: v20pre_merge_check_runstable (PK repo+pr+check)src/bot/review/pipeline.rs: run before readiness;error-mode failures become readiness hard blockers (score 0) and fail the Codasaurus check run; results posted as PR comment + appended to check-run summaryTests
245 lib tests pass (3 new: glob matching, scope filtering, offline inconclusive). fmt + clippy -D warnings clean.
Docs:
docs/codasaurus-toml.mdexample for[[pre_merge.checks]].