Skip to content

feat(bot): natural-language pre-merge checks (Phase 5) - #28

Merged
lohitkolluri merged 1 commit into
feat/osv-reachabilityfrom
feat/pre-merge-checks
Aug 2, 2026
Merged

feat(bot): natural-language pre-merge checks (Phase 5)#28
lohitkolluri merged 1 commit into
feat/osv-reachabilityfrom
feat/pre-merge-checks

Conversation

@lohitkolluri

Copy link
Copy Markdown
Owner

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 to pre_merge_check_runs
  • src/llm/mod.rs: premerge_check — strict two-line output contract (PASSED/FAILED/INCONCLUSIVE + reasoning), diff truncated to 20k chars, untrusted-content delimiters
  • src/config.rs: PreMergeCheck + checks on PreMergeConfig
  • src/db/migrations.rs: v20 pre_merge_check_runs table (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 summary

Tests

245 lib tests pass (3 new: glob matching, scope filtering, offline inconclusive). fmt + clippy -D warnings clean.

Docs: docs/codasaurus-toml.md example for [[pre_merge.checks]].

Signed-off-by: Lohit Kolluri <lohitkolluri@gmail.com>
@codasaurus-e0a6

Copy link
Copy Markdown

Codasaurus

BLOCKING: 0 WARNING: 0 INFO: 0 READY TO MERGE: YES

This PR updates 7 files across src, docs. Automated checks look clear.

Changes

Path What changed
docs/codasaurus-toml.md updated
src/bot/mod.rs updated
src/bot/premerge.rs added
src/bot/review/pipeline.rs updated
src/config.rs updated
src/db/migrations.rs updated
src/llm/mod.rs updated
All files (7)
  • docs/codasaurus-toml.md (modified)
  • src/bot/mod.rs (modified)
  • src/bot/premerge.rs (added)
  • src/bot/review/pipeline.rs (modified)
  • src/config.rs (modified)
  • src/db/migrations.rs (modified)
  • src/llm/mod.rs (modified)

@codasaurus-e0a6

Copy link
Copy Markdown

Context

Blast radius

BLAST RADIUS: MODERATE SCORE: 40

Sensitive path: src/bot/mod.rs (+1)

Blast details

High-sensitivity paths:

  • src/bot/mod.rs
  • src/llm/mod.rs

Bounded estimate from PR imports only.

Related pull requests

@codasaurus-e0a6

Copy link
Copy Markdown

Checks

All clear. Automated checks did not find anything to fix before merge.

Commands

Type as plain text (GitHub Apps are not @-mentionable):

review · describe · summarize · improve · security · ask … · ignore <fp> · help

Full list: @codasaurus help

@codasaurus-e0a6 codasaurus-e0a6 Bot added the documentation Improvements or additions to documentation label Aug 2, 2026
@lohitkolluri
lohitkolluri merged commit bc574b1 into feat/osv-reachability Aug 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant