Skip to content

fix(gate): gate non-confirmed contributors normally (eliminate the manual-review backlog) - #1140

Merged
JSONbored merged 1 commit into
mainfrom
feat/gate-nonconfirmed
Jun 24, 2026
Merged

fix(gate): gate non-confirmed contributors normally (eliminate the manual-review backlog)#1140
JSONbored merged 1 commit into
mainfrom
feat/gate-nonconfirmed

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

DO NOT MERGE — consequential policy change for human review

This removes a blanket gate rule. Please review the policy implications before merging.

What changed

Previously the gate had a blanket special-case: any non-confirmed-Gittensor contributor whose PR tripped a real blocker was forced to a neutral (non-blocking) conclusion — never failure. In the converged autonomy model a neutral gate flows to a held + labeled state, so every non-confirmed PR with a blocker landed in the maintainer's manual-review queue. That blanket rule is the source of the manual-review flood.

This PR removes that rule everywhere. Non-confirmed contributors are now gated identically to confirmed authors:

  • a real blocker → failure → one-shot auto-close (taopedia model)
  • a clean PR → success → auto-merge

Confirmed-Gittensor status now affects only on-chain scoring, never the merge/close verdict. The review + CI + guardrail still vet every PR.

The opt-in first-time-contributor grace is unchanged — a genuine newcomer (0 merged PRs, not a repeat offender) still gets a non-blocking advisory gate when the maintainer opts in, so real first contributions stay protected. The eval-not-ready neutral (repo/PR still syncing) is also unchanged.

Surfaces updated for consistency

  • src/rules/advisory.tsevaluateGateCheck: the blanket confirmedContributor === false → neutral branch removed (the gate decision); confirmedContributor JSDoc updated.
  • src/rules/predicted-gate.ts — the pre-submission predictor delegates its verdict to evaluateGateCheck, so it now mirrors the real gate automatically; the PREDICTED_GATE_NOTE and the confirmedContributor doc updated to the new rule.
  • src/github/app.ts — the pending Gate check-run text no longer claims the gate "only blocks confirmed Gittensor contributors".
  • src/queue/processors.ts, src/settings/agent-actions.ts, src/types.ts, src/mcp/server.ts — comment + JSDoc consistency. The agent maintenance planner already keys off the gate verdict (not confirmation), so a non-confirmed PR now auto-merges/closes through the existing path with no logic change.

Tests

Updated every test that asserted the old non-confirmed → neutral behavior to assert the new gate-normally behavior precisely (failure with the exact blocker code when a blocker fired, success when clean): gate-check-policy, predicted-gate, mcp-predict-gate, parity-wire, queue, github-app, rules, safety. First-time-grace and eval-not-ready assertions left intact.

Notable behavior shifts now covered:

  • the parity shadow now records a comparable hold row for a failing non-confirmed PR (previously a non-comparable neutral → no row).
  • the MCP gittensory_predict_gate "API down → can't confirm" case now still predicts failure on a blocker — an API outage can neither falsely block nor falsely un-block.

Verification

  • npx tsc --noEmit clean (exactOptionalPropertyTypes + noUncheckedIndexedAccess).
  • Full npx vitest run green: 3593 passed, 1 skipped, 0 failed.

…nual-review backlog)

Remove the blanket "non-confirmed contributor never blocks" rule across every
surface. Non-confirmed contributors are now gated identically to confirmed
authors: a real blocker fails the gate (one-shot close), a clean PR passes
(auto-merge). Confirmed-Gittensor status now affects only on-chain scoring,
never the merge/close verdict.

- predicted-gate.ts: docstrings (PREDICTED_GATE_NOTE + the confirmedContributor
  field) updated to describe the new rule; the predictor already delegated the
  verdict to evaluateGateCheck, so it mirrors the real gate exactly.
- app.ts: the pending Gate check-run text no longer claims the gate "only blocks
  confirmed Gittensor contributors".
- processors.ts / agent-actions.ts / types.ts / mcp/server.ts: comment + JSDoc
  consistency for the new policy; the agent acts purely off the gate verdict, so
  the auto-merge/close behavior follows automatically.
- Tests: gate-check-policy, predicted-gate, mcp-predict-gate, parity-wire,
  queue, github-app, rules, safety updated to assert the new gate-normally
  behavior (failure on a blocker, success when clean) instead of the old
  forced-neutral; the first-time-contributor grace assertions are unchanged.

First-time-newcomer grace and the eval-not-ready neutral remain intact.
@dosubot dosubot Bot added the size:M label Jun 24, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored
JSONbored merged commit 6cf4b3e into main Jun 24, 2026
14 checks passed
@JSONbored
JSONbored deleted the feat/gate-nonconfirmed branch June 24, 2026 02:08
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.77%. Comparing base (9f1d666) to head (9d0dea4).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1140      +/-   ##
==========================================
- Coverage   94.77%   94.77%   -0.01%     
==========================================
  Files         156      156              
  Lines       18864    18862       -2     
  Branches     6829     6828       -1     
==========================================
- Hits        17878    17876       -2     
  Misses        404      404              
  Partials      582      582              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant