Skip to content

source-control:babysit-prs: one shared authorship/finding/approval classifier + golden fixtures; gate script owns the merge-ready boolean (6-issue class) #534

Description

@kyle-sexton

Category: refactor (umbrella) · Source: control-tower gap-hunt 2026-07-19 (signal mining + skill-catalog audit)

Pattern — merge-readiness classification is ad-hoc per call site, and the model re-derives what a script should own

Six open issues are the same defect class — the babysit snapshot/gate misclassifies authorship/finding/approval state:

Root cause: authorship/finding/approval detection is hand-rolled at each call site; no shared classifier; no fixture tests. Consequence documented in the lane prompt itself: because the gate script is unreliable, the prompt instructs the model to cross-check live thread state each cycle — the model re-derives a boolean predicate (green + issue-linked + lane-authored + no human block + no do-not-merge + head-unchanged + author≠approver) that should be script-owned.

Proposed fix

  1. Extract ONE shared classifier (authorship, finding, approval state) used by snapshot, readiness gate, and needs_worker.
  2. Golden PR-state fixtures: bot-vs-human thread, nit-approval, resolved finding, self-reply, single-PR mode — every member issue above becomes a fixture case; regression-proof by construction.
  3. babysit-readiness-gate.sh owns the merge-ready boolean end-to-end; the model consumes its verdict and never re-evaluates. This is a precondition for trusting feat(source-control): babysit autopilot merge tier — bot-account review + criteria-gated merge #476 autopilot merges.

Relations

Members above; #476 (autopilot trusts this boolean); #475/#484 (adjacent gate-script contract bugs); #479 (absorption umbrella — the prompt's cross-check workaround gets deleted when this lands).

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: highSignificant impact, or blocks an imminent release; staff this cycle.status: readyTriaged, unblocked, and fully specified; eligible to pick up.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions