← Back to Pull requests

agents: validate-kind PRs graded by their clean re-run and auto-merged when good #16279

Closed
unknown closed this pull request without merging on Nov 21, 2026 22:54 UTC
View on GitHub
unknown unknown commented on Nov 21, 2026 21:34 UTC
Author

Lets validate-kind PRs merge on their own when their clean re-run passed - graded mechanically by the recipe that ran the test, not by the agent and not by a separate assessment.

Grade (in validate-kind)

The recipe's clean re-run step, which already runs the committed script (the default fixture and every variant), now also grades it:

  • good only if there was a clean run, every run's REPORT says Verdict: PASS (N passed, 0 failed), every fixture variant ran as asked, and the commits change only hack/manual-validate/<kind>/;

  • poor otherwise - including a FAIL, which is a controller finding a person should see before anything merges.
  • The grade and its reasons head receipts.md (attached to the PR). After the agent writes change.yaml, a step adds overseer/assessment/good or /poor to the PR's labels from that grade, dropping any overseer/assessment/* label the agent wrote.

    Opt-in and merge

  • Opt-in, off by default, set on the batch: add overseer/auto-merge to the labels: line of a batch's ## Fan-out section; children created after that carry it, and factory's inherit-labels copies a child's labels onto its PR on every pass. For a child already created, label the child. open-batch.sh takes AUTO_MERGE=1 (changed_kinds.py --auto-merge) to open a batch opted in from the start. The scheduled verify-changes chore runs it with AUTO_MERGE=1, so the batches it opens are opted in; change that line in .agents/verify-changes.md to stop.

  • .agents/watch/merge-validate-kind.yaml (new), modelled on merge-controller: overseer/auto-merge + overseer/validate-kind + overseer/ready-for-human + overseer/assessment/good, no hold or stop, green, mergeable, not a draft, no changes requested -> the merge recipe; same cooldown, reset on a new head, give up after 6.
  • Checked

  • The recipe parses with factory's recipe.Parse; every KCC rule loads with factory's rules.LoadFiles (merge-validate-kind: PR, order 82, takes the item), and Unlisted reports nothing new.

  • The grading and labelling steps, run in a scratch repo: every run passing and only the Kind's files changed -> good; a FAIL, a file outside hack/manual-validate/<kind>/, or a skipped variant -> poor; an overseer/assessment/good the agent wrote is replaced by the recipe's grade; a no-change comment is left as is.

  • changed_kinds_test.py passes (auto-merge off by default, and opted in).
  • ``release-note
    NONE
    ``

    Diff: 310 lines (+232 / -78) across 3 files Reviewer: barney-s Review duration: 79m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 310 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.343
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #16279"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 40.3% (MEDIUM) · Higher = larger blast radius
    40.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.9% · Safe to merge
    15.9%