feat(orb): weekly stratified decision-audit sampling with a frozen adjudication rubric - #8840
Conversation
…judication rubric The gate's only confirmation signal is 'no human reversed it' -- a lower bound on error, not a label: humans reverse only what they notice, so a silently-wrong merge scores as correct and every accuracy figure inherits the bias. Closes #8830. Part of epic #8828 (Phase 2 -- labels). - decision_audit_labels (migration 0178): one label per PR ever, adjudications comparable only within a rubric version - pure stratified sampler: merges oversampled (the costly arm), a first-time-author stratum (weakest priors), deterministic under an injected rng, thin strata spill instead of shrinking the sample - weekly cron enqueue (Tuesday 08:00 UTC), flag-gated by LOOPOVER_DECISION_AUDIT (default OFF, byte-identical), self-host only; the dispatch re-checks the flag so a stale queued job after a flag flip does zero work - internal adjudication routes: list (filterable) + adjudicate; a second adjudication 409s -- labels are calibration data, rewrites must be deliberate via a rubric-version bump, never silent - docs/decision-audit-rubric.md v1: judge the decision at decision-time knowledge, not the outcome; 'uncertain' is a first-class label excluded from both sides and tracked as a rate
…pfront The randomized close-holdout (#8831) lands its adjudications in the same label store; widening the CHECK now spares that PR a SQLite table rebuild for one enum value.
A holdout_close row (#8831) is created while the PR is still held -- no realized outcome exists yet; the human adjudication is its ground truth. The weekly sampler always supplies an outcome.
…des the UPDATE Superagent P1 on this PR, and it is right: select-then-update lets two concurrent adjudications both pass the pending check and both write, silently violating the one-adjudication-per-label guarantee. The predicate now rides the UPDATE (WHERE status = 'pending'); zero changes disambiguates 404 vs 409 with a read that no longer guards anything. Regression test races two concurrent adjudications: exactly one 200, one 409, one surviving label. Also binds LOOPOVER_NATIVE_SOURCE instead of a hardcoded source literal (branding-drift check).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8840 +/- ##
=======================================
Coverage 93.83% 93.84%
=======================================
Files 800 801 +1
Lines 79879 79953 +74
Branches 24209 24227 +18
=======================================
+ Hits 74956 75030 +74
Misses 3558 3558
Partials 1365 1365
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-26 11:45:04 UTC
Review summary Blockers
Nits — 6 non-blocking
Concerns raised — review before merging
📋 Copy for AI agents — paste into your coding agentDecision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Review blocker on this PR, and it is right: the author count read every cached pull_requests row, so a newcomer with several open-but-undecided PRs and exactly one decided PR was wrongly marked veteran -- starving the stratum whose whole purpose is weak-prior newcomers. The count now requires a realized pr_outcome per counted PR, with a regression test seeding open PRs that must not inflate the total.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
What
The human-label pipeline: a weekly stratified sample of the gate's decisions, adjudicated by a human against a frozen rubric, stored as calibration data. Closes #8830 (epic #8828, Phase 2 — labels).
Why
Every accuracy figure we publish is currently confirmed by "no human reversed it" — a lower bound on error, not a label. Humans reverse only what they notice; a silently-wrong merge scores as correct forever. The audit sample is the independent measurement: its divergence from the reversal-based number is the label bias, quantified. It also becomes the calibration set the risk-control thresholds (#8835) train on — without it, "≥99.5% guaranteed" has nothing to stand on.
How
decision_audit_labels(migration 0178): one label per PR ever (UNIQUE(target_id)— a re-draw can never double-label), adjudications carry the rubric version they were made under.planAuditSample): merges oversampled at 50% (the costly arm), 20% first-time-author stratum (where the gate's priors are weakest), 30% closes; deterministic under an injected RNG; thin strata spill into the rest rather than shrinking the week's sample. Policy closes (fix(orb): score enforcement closes as their own class, not quality mispredictions #8827) are excluded at the candidate query — enforcement is not a quality decision to audit.LOOPOVER_DECISION_AUDIT, default OFF — the job is never enqueued and the tick is byte-identical to today. Self-host only. The dispatch re-checks the flag so a stale queued job after a flip does zero work./v1/internal/audit-labels, bearer-gated): list (filterable by status) + adjudicate. A second adjudication 409s — labels are calibration data; corrections require a rubric-version bump, never a silent rewrite.docs/decision-audit-rubric.mdv1: judge the decision at decision-time knowledge, not the outcome; ignore reversal state (that bias is what the audit measures);uncertainis a first-class label excluded from both numerator and denominator and tracked as its own rate.pull_requests.author_login(the audit ledger carries no logins by design); a PR with no cached row degrades to not-first-time rather than guessing.Verification