Skip to content

source-control:babysit-prs: should formal APPROVED-state reviews be severity-scanned before the ignored short-circuit (bot AND human paths) #621

Closed

Description

@kyle-sexton

Lane: babysit. Triggering PR: #567 (fix/499-babysit-snapshot-approve-nits-classification). Source: Codex P1 re-review thread #567 (comment).

Finding

A reviewer bot can submit a formal APPROVED-state review whose body carries a live CRITICAL/IMPORTANT finding (e.g. Verdict: Approve overall. IMPORTANT: authorization bypass.). In collect_feedback (plugins/source-control/skills/babysit-prs/scripts/babysit_feedback.py) the elif state in {"APPROVED", "DISMISSED"}: ignored.append(record) branch short-circuits to ignored before the has_blocking_text / has_blocking_severity predicate is reached, so the severity marker is never inspected — no blocker, no worker dispatch. The same short-circuit exists on the non-bot (human) path a few lines above.

Why this is a deferred design question, not a PR #567 fix

Per the no-false-guarantees rule, PR #567 does not ship a present-tense guarantee this finding contradicts: its CHANGELOG/docstring wording was narrowed to the enforced behavior (severity stays blocking in a comment or non-APPROVED-state review), with this issue cited as the caveat. The classifier itself is left unchanged in #567.

The design question to decide

Should a formal APPROVED/DISMISSED-state review (bot and human) have its body severity-scanned before the ignored short-circuit — i.e. can a live CRITICAL/IMPORTANT in the body override the reviewer's explicit approval state? If yes, define the precedence and the false-positive guard; apply consistently across both paths.

Belongs to the #534 shared-classifier design space; likely umbrella-fold at triage.

Activity

  1. added
    needs-triage
    on Jul 20, 2026
  2. kyle-sexton commented on Jul 20, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during triage.

    Triage (umbrella-fold) — reporter self-flagged this as belonging to #534's shared-classifier design space (the APPROVED/DISMISSED short-circuit precedence question, bot and human paths). Folding rather than routing standalone per the umbrella-fold rule.

    Blocked by #534's decision. Not routed to needs-human individually.

  3. removed
    needs-triage
    on Jul 20, 2026
  4. added
    needs-triage
    and removed
    needs-triage
    on Jul 20, 2026
  5. kyle-sexton commented on Jul 20, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during triage (historic normalization, rule 8g).

    Reporter severity note (rule 5 sub-sort): this masks CRITICAL/IMPORTANT findings behind a formal APPROVED-state review — high consequence if it fires, even though tier stays priority: medium per rule 8c (source-control is a priority-set plugin, which affects ordering within the tier, not the tier itself).

    The design question is genuinely open, not a single defaultable fork: should a formal APPROVED review ever short-circuit before severity inspection, or should severity markers always gate regardless of review state (and if so, on both the bot and human paths, which currently share the same short-circuit)? Reserved for a human call rather than defaulted.

  6. added
    needs-human
    wayfind: design
    on Jul 20, 2026
  7. added theissue type on Jul 20, 2026
  8. kyle-sexton commented on Jul 20, 2026

    @kyle-sexton
    MemberAuthor

    Decision brief — APPROVED-state severity short-circuit (bot & human paths)

    2-minute read. Human decision required; this brief does not decide, relabel, or close.

    Problem (2 sentences)

    A reviewer submitting a formal APPROVED-state review whose body carries a live CRITICAL/IMPORTANT finding is routed straight to ignored — the severity of the body is never inspected, so no blocker is raised and no worker is dispatched. High consequence if it fires (a masked high-severity finding merges), even though this lane's tier stays priority: medium.

    What's verified today (cited, against origin/main @ 49c2ae5)

    collect_feedback in plugins/source-control/skills/babysit-prs/scripts/babysit_feedback.py:

    • Bot path (kind == "bot"): state == "CHANGES_REQUESTED" → blocking (L201-202); state in {"APPROVED","DISMISSED"} → ignored, short-circuit (L203-204); only the else branch (COMMENTED / no state) reaches has_blocking_text(text) or has_blocking_severity(text) (L205).
    • Human path (kind != "bot"): state in {"APPROVED","DISMISSED"} → ignored, short-circuit (L190-191); the non-approved branch gates on inlineReview / CHANGES_REQUESTED / has_blocking_text(text) only (L192-197) — note it does not call has_blocking_severity at all.

    Three facts that sharpen the decision beyond the issue's own framing:

    1. The codebase has already decided prose-approval cannot mask a CRITICAL. approval_downgrade (babysit_classify.py L305-306) returns False — stays blocking — when a CRITICAL/IMPORTANT marker survives negation redaction. The formal APPROVED state is the one remaining path where an approval verdict can still mask a live finding. Fixing it extends an established principle to the state-based path; it is not new policy.
    2. The bot path is internally inconsistent today. The COMMENTED-state branch already calls has_blocking_severity (L205); the APPROVED branch short-circuits before it (L203-204). So an APPROVED bot review is treated more leniently than a COMMENTED one with the identical CRITICAL body. The fix reuses a primitive already wired into the sibling branch.
    3. has_blocking_severity already exists (babysit_classify.py L269-280) — negation-redacted CRITICAL/IMPORTANT scan, the exact reuse target. No new classifier needed.

    #534 status correction

    Comment 1 folded this under #534 as "blocked by #534's decision." #534 is now CLOSED — it delivered the shared classifier (babysit_classify.py, incl. has_blocking_severity) but did not decide this precedence question. So #621 is now unblocked and implementable, not resolved. The stale "blocked by #534" framing no longer holds.

    Options

    (a) — RECOMMENDED — Severity-scan the bot APPROVED path now; treat the human APPROVED path as a separate, flagged judgment call.
    Insert a has_blocking_severity(text) check ahead of the bot {APPROVED,DISMISSED}→ignored short-circuit so a surviving CRITICAL/IMPORTANT routes to blocking (or material under the existing approval_downgrade/disposition precedence).

    • Why bot-first, not "cheaper partial": the triggering case (PR fix(source-control): babysit snapshot classifies Approve-with-nits bot review as non-blocking (#499) #567 thread) is a reviewer bot; the concentrated real risk and the internal inconsistency (fix: correct plugin-system inaccuracies and harden references #2 above) both live on the bot path. This is a consistency fix reusing an already-wired primitive — low added latency, low false-positive surface (approval_downgrade's negation guards apply), and easily reversible (single predicate).
    • Scope to APPROVED, not DISMISSED: a DISMISSED review was explicitly set aside; scanning its body could resurrect stale findings. Keep DISMISSED on the short-circuit unless separately justified.
    • Human path deferred as a flagged call, not swept in: a human clicking GitHub's Approve is a deliberate, stronger signal than a bot's automated state, and re-blocking on body prose overrides an explicit human action. The human path also has no has_blocking_severity wiring today (net-new, not a symmetric move). Recommend: implement the bot fix, and put the human-path question to the operator as a distinct decision (see (c)).

    (b) — Status quo: keep {APPROVED,DISMISSED} as an unconditional short-circuit on both paths. REJECTED.
    Leaves the bot path treating APPROVED more leniently than COMMENTED for identical CRITICAL bodies (#2), and leaves the masked-finding gap open. The consequence (a high-severity finding merges unseen) outweighs the near-zero cost of the (a) predicate. Recorded only to state the risk being declined.

    (c) — Also severity-scan the human APPROVED path (complete symmetry).
    Add has_blocking_severity gating ahead of the human {APPROVED,DISMISSED}→ignored short-circuit (L190-191).

    • For: closes the gap symmetrically; a human can also paste a CRITICAL under an Approve click.
    • Against: net-new wiring (human path has no severity scan today); genuinely overrides a deliberate human action on the basis of body prose — higher false-positive/annoyance cost, and philosophically contestable in a way the bot case is not. This is the "strong reason not to" the masked-findings argument has to answer.
    • Recommendation: do not bundle into (a). Surface as the operator's explicit choice; if taken, apply the same APPROVED-only (not DISMISSED) scoping and consider a guard/notice rather than a hard silent re-block.

    Tradeoff summary

    False-negative (masked CRITICAL) Added latency/complexity Overrides deliberate signal Reversibility
    (a) bot-only Closes bot-path gap ~nil (reuses primitive) No (bot state is automated) High (one predicate)
    (b) status quo Open none n/a n/a
    (c) + human Closes both Net-new human wiring Yes (human Approve click) High, but reverts a policy choice

    Recommendation restated: take (a) — bot APPROVED path severity-scanned now (APPROVED only), leaning toward closing the security-relevant gap where the risk and the code inconsistency concentrate; defer the human path (c) to an explicit operator call rather than flattening "both paths" into one undifferentiated fix.

  9. kyle-sexton commented on Aug 12, 2026

    @kyle-sexton
    MemberAuthor

    Frontier disposition (drain session)

    Ruling: no severity-scan before the APPROVED short-circuit. A formal APPROVED-state review is the reviewer's authoritative verdict; letting body prose override the formal state inverts the review contract and turns every approval into a text-classification problem. A reviewer that approves while writing IMPORTANT/CRITICAL in the body is emitting a contradictory signal, and the fix belongs on the reviewer's side, not in babysit-prs second-guessing formal states.

    Reopen trigger: a demonstrated case where a live P1 finding shipped because it rode in an APPROVED body and was materially missed (not merely re-raised in a later CHANGES_REQUESTED round).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-humanwayfind: design

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions