Skip to content

Fix predicted gate parity for contributor status and inferred linked issues - #691

Merged
JSONbored merged 2 commits into
mainfrom
codex/fix-predicted-gate-logic-divergence
Jun 14, 2026
Merged

Fix predicted gate parity for contributor status and inferred linked issues#691
JSONbored merged 2 commits into
mainfrom
codex/fix-predicted-gate-logic-divergence

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • Ensure local pre-submission predicted gate matches the real PR gate behavior for non-confirmed contributors and for linked issues inferred from the branch body.

Description

  • Pass the contributor confirmation into the prediction call by setting confirmedContributor: Boolean(context.gittensorSnapshot) when calling buildPredictedGateVerdict in src/api/routes.ts.
  • Build preflight before creating the synthetic PR and use preflight.linkedIssues for the synthetic PR in src/rules/predicted-gate.ts so body-inferred references like Closes #7 are honored.
  • Add a unit test in test/unit/predicted-gate.test.ts that verifies body-inferred linked issues satisfy linkedIssue: "block" parity.

Testing

  • Ran the unit tests for the predicted gate with npm test -- test/unit/predicted-gate.test.ts, and all tests passed (6 passed).
  • Ran type checking with npm run typecheck, which completed successfully.

Codex Task

@ghost

ghost commented Jun 14, 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 #691 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 14, 2026
@ghost

ghost commented Jun 14, 2026

Copy link
Copy Markdown

gittensory · advisory review

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

Suggested action:Safe to merge — both reviewers found no blocking issues.

Reviewer A · gpt-oss-120b — recommends ✅ merge
The PR fixes linked‑issue handling in the predicted‑gate rule and adds a contributor‑status flag to the API analysis payload. The changes are well‑scoped, preserve existing behavior, and the new test confirms the parity fix.

Suggestions

  • Add a unit test for the new confirmedContributor field in the API response to ensure its presence and type.
  • Update any TypeScript interface for the analysis payload to include the optional confirmedContributor?: boolean field.
  • Run the full test suite to confirm no type regressions from the added field.

Worth double-checking

  • The new confirmedContributor flag is added to a public‑facing response object; ensure it does not leak any private information (it is a boolean, so safe).
  • If context.gittensorSnapshot is unexpectedly truthy for non‑contributors, the flag could be set incorrectly; consider adding a guard or explicit comment.

Reviewer B · nemotron-3-120b-a12b — recommends ✅ merge
The PR moves synthetic PR creation to use preflight's normalized linked issues (from body parsing) for parity with real PRs, and adds a confirmedContributor flag based on snapshot presence. This fixes inferred linked issue handling and contributor status in predicted gate logic. The new test verifies body-linked issue parity works correctly.

Suggestions

  • Add a test case for the confirmedContributor flag to verify it affects predicted gate outcomes (e.g., neutral vs. non-neutral prediction for unconfirmed/confirmed contributors).
  • Ensure the preflight.linkedIssues field is always defined (it appears to be, but verify the preflight return type).

Worth double-checking

  • The confirmedContributor flag's usage in predicted gate logic isn't visible in this diff; verify it doesn't introduce unintended behavior.
  • Double-check that preflight.linkedIssues correctly handles edge cases (e.g., multiple issue references, malformed references) as the existing preflight tests likely cover.

@superagent-security

Copy link
Copy Markdown
Contributor

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

@ghost ghost added the gittensory-review label Jun 14, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 14, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui 4193f04 Commit Preview URL

Branch Preview URL
Jun 14 2026, 02:16 PM

@JSONbored
JSONbored merged commit 0bdebf6 into main Jun 14, 2026
11 checks passed
@JSONbored
JSONbored deleted the codex/fix-predicted-gate-logic-divergence branch June 14, 2026 14:26
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 14, 2026
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