Skip to content

fix(github): block only confirmed Gittensor contributors in the PR Gate - #644

Merged
JSONbored merged 2 commits into
mainfrom
gate-confirmed-contributor-fix
Jun 13, 2026
Merged

fix(github): block only confirmed Gittensor contributors in the PR Gate#644
JSONbored merged 2 commits into
mainfrom
gate-confirmed-contributor-fix

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Problem

The Gittensory Gate check was blocking PRs from contributors it should never block. On awesome-claude #2125, a non-gittensor contributor was failed with "No linked issue detected."

Root cause: the gate conclusion (evaluateGateCheck) was computed without consulting contributor confirmation — the confirmed-contributor check only gated the public comment, never the Gate. It also blocked on missing linked issues (issues aren't always available) and on the app's own sync state (repo_not_cached / pr_not_cachedaction_required).

All installed repos are gittensor-registered, so the only axis that matters is the contributor: confirmed gittensor miner vs. not.

Changes (Phase A)

  1. Confirmed-contributor-only blocking — thread official.status === "confirmed" into the gate policy (gateCheckPolicyevaluateGateCheck). Any non-confirmed author gets a neutral, non-blocking gate + the existing minimal advisory comment, regardless of which blockers fired.
  2. Never block on app/infra staterepo_not_registered / repo_not_seen / pr_not_cached now resolve to a neutral "not evaluated yet" gate that re-runs automatically, instead of action_required.
  3. Drop missing-linked-issue blocking by defaultlinkedIssueGateMode defaults to advisory (opt-in to block). Duplicates still block by default.
  4. Crystal-clear messaging — the Gate title names the exact blocker (or blocker count); the summary enumerates every active blocker with its fix.

The PR readiness panel mirrors the same confirmed-gated conclusion (it already receives the real gate evaluation), and app-state renders as non-blocking "Not blocking / Advisory" instead of "App action required".

Behavior matrix

Author Blocker present? Gate
Not confirmed any neutral (non-blocking)
Confirmed none success
Confirmed opted-in blocker (e.g. duplicate) failure, naming the blocker
(any) repo/PR not synced yet neutral, re-runs automatically

Validation (from repo root)

  • npm run typecheck — clean
  • npx vitest run — 1571 passed, 1 skipped
  • npm run test:coverage — statements 99.0% / branches 97.0% / functions 98.5% / lines 99.7% (≥97% gate)
  • npm run test:workers — pass
  • npm run ui:openapi:check — no drift
  • git diff --check — clean

New/updated tests: gate neutral for non-confirmed authors regardless of blockers; failure only for a confirmed author + opted-in blocker; app-state neutral; clear single/multi blocker titles; end-to-end confirmed-contributor block through the queue.

Notes

  • Backend-only; auto-deploys via the gittensory-api Workers Builds connection on merge to main.
  • Phase B (.gittensory.yml authoritative config + deterministic opt-in blockers) and Phase C (dual-AI review) follow separately.

The Gittensory Gate blocked PRs from non-confirmed contributors (e.g.
awesome-claude #2125, authored by a non-gittensor contributor, was failed
with "No linked issue detected"). Root cause: the gate conclusion was
computed without consulting contributor confirmation, and it also blocked
on missing linked issues and on the app's own sync state.

- Confirmed-contributor-only blocking: thread `official.status === "confirmed"`
  into the gate policy; force a neutral (non-blocking) conclusion for any
  non-confirmed author, regardless of which blockers fired.
- Never block on app/infra state: repo-not-synced / PR-not-cached now resolve
  to a neutral "not evaluated yet" gate that re-runs automatically, instead of
  action_required.
- Drop missing-linked-issue blocking by default: linkedIssueGateMode now
  defaults to advisory (issues aren't always available); duplicates still
  block by default.
- Crystal-clear messaging: the Gate title names the exact blocker (or blocker
  count) and the summary enumerates every active blocker with its fix.

Tests: gate is neutral for non-confirmed authors regardless of blockers;
failure only for a confirmed author with an opted-in blocker; app-state
neutral; plus an end-to-end confirmed-contributor block through the queue.
@ghost

ghost commented Jun 13, 2026

Copy link
Copy Markdown

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #644 is no longer open. No action.

💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

@ghost ghost added the gittensory:reviewed label Jun 13, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

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

@ghost

ghost commented Jun 13, 2026

Copy link
Copy Markdown

gittensory · advisory review

Reviewed 10 changed file(s) — two independent AI reviewers.

Suggested action: 🛠️ Request changes. Address the suggestions below before merging.

Reviewer A · gpt-oss-120b — recommends 🛠️ request changes
The PR refactors gate logic to only hard‑block confirmed Gittensor contributors and changes the default linked‑issue gate mode to advisory, updating UI messages and adding comprehensive tests. However, the new formatGateCheckOutput function overwrites the dynamic summary, causing tests for neutral/unevaluated cases to fail.

Suggestions

  • Modify formatGateCheckOutput to return gate.summary instead of the static string, preserving the context‑specific summary for neutral and unevaluated gates.
  • Add a test case for when confirmedContributor is undefined to verify the default blocking behavior remains correct.
  • Consider documenting the change in default linkedIssueGateMode in the project changelog or migration notes.

Worth double-checking

  • If formatGateCheckOutput is not corrected, UI will display misleading summaries for neutral or unevaluated gates.
  • Changing default linkedIssueGateMode may affect existing repositories that relied on the previous blocking behavior.

Reviewer B · nemotron-3-120b-a12b — recommends 🛠️ request changes
This PR changes the default behavior of the linkedIssueGateMode from 'block' to 'advisory' and introduces contributor-gated blocking: only confirmed Gittensor contributors can be hard-blocked by PR gates. Non-confirmed contributors receive advisory-only gates even when blockers are present. The changes are well-tested with updated unit tests covering the new logic, including app/infra state handling and confirmed contributor scenarios. The public/private boundary appears maintained as no forbidden terms surfaced in output changes.

Suggestions

  • Update the condition in evaluateGateCheck to treat undefined confirmedContributor as non-blocking (i.e., block only when confirmedContributor === true). Currently, undefined status allows blocking which violates the requirement.
  • Add a test case for undefined confirmedContributor with blockers to verify neutral outcome.
  • Consider adding a release note about the linkedIssueGateMode default change from 'block' to 'advisory' for downstream consumers.

Worth double-checking

  • Incorrect handling of undefined confirmedContributor could lead to blocking non-confirmed contributors, violating the core requirement.
  • Changing the default for linkedIssueGateMode may affect existing repositories that rely on the previous blocking behavior (though they can override via settings).
  • The new gate evaluation logic is complex; ensure all code paths properly handle the confirmedContributor flag and neutral states.

@ghost ghost added the gittensory-review label Jun 13, 2026
@JSONbored
JSONbored merged commit 21db312 into main Jun 13, 2026
10 checks passed
@JSONbored
JSONbored deleted the gate-confirmed-contributor-fix branch June 13, 2026 08:58
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 13, 2026
JSONbored added a commit that referenced this pull request Jul 14, 2026
…onfirmed contributors (#5732)

The confirmedContributor gate on AI review (originally #644, about not applying
miner-specific gate rules to non-miner PRs) had been reused to skip the AI-driven
defect scan entirely for unconfirmed/new contributors by default -- leaving a new
contributor's PR with LESS scrutiny than an established one's, backwards from the
intended security posture. AI review now runs for every author once a repo has
opted into aiReviewMode, with an explicit opt-in aiReviewConfirmedContributorsOnly
setting for self-hosters who deliberately want to bound AI spend to registered
miners (aiReviewAllAuthors still widens back out within that narrowed mode).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant