Skip to content

fix(scoring): wire duplicate risk preview input - #512

Merged
JSONbored merged 1 commit into
mainfrom
codex/fix-unreachable-duplicate_risk-blocker
Jun 10, 2026
Merged

fix(scoring): wire duplicate risk preview input#512
JSONbored merged 1 commit into
mainfrom
codex/fix-unreachable-duplicate_risk-blocker

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • The duplicate_risk reducer blocker in buildScorePreview() depended on ScorePreviewInput.duplicateRiskCount, but public API, MCP tool shapes, and some production call paths did not preserve or populate that field so the blocker was effectively unreachable in normal flows.

Description

  • Add duplicateRiskCount to the public scoring preview Zod schema in src/api/routes.ts so /v1/scoring/preview preserves the signal into buildScorePreview().
  • Add duplicateRiskCount to the MCP scorePreviewShape in src/mcp/server.ts so MCP tool calls (e.g. gittensory_preview_local_pr_score) and variant comparisons can provide the signal.
  • Add integration assertions in test/integration/api.test.ts to verify the API and MCP tool retain duplicateRiskCount and that the resulting preview includes the duplicate_risk reducer blocker.
  • Kept existing local-branch wiring that already supplies duplicateRiskCount from preflight collisions, so the change only exposes the value to API/MCP callers and test coverage.

Testing

  • Ran the focused test subset with npm test -- --run test/integration/api.test.ts test/unit/local-branch.test.ts test/unit/scenario-blockers.test.ts and all tests passed (Test Files 3 passed (3), Tests 80 passed (80)).
  • Ran typecheck with npm run typecheck (tsc --noEmit) and it completed successfully.

Codex Task

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 9, 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 c216c1b Commit Preview URL

Branch Preview URL
Jun 10 2026, 08:28 AM

@github-actions github-actions Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jun 9, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

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

@ghost

ghost commented Jun 9, 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 #512 is no longer open. No action.

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

@JSONbored
JSONbored force-pushed the codex/fix-unreachable-duplicate_risk-blocker branch from 0a8c742 to c216c1b Compare June 10, 2026 08:26
@JSONbored
JSONbored merged commit 156533e into main Jun 10, 2026
10 checks passed
@JSONbored
JSONbored deleted the codex/fix-unreachable-duplicate_risk-blocker branch June 10, 2026 08:29
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 10, 2026
@JSONbored JSONbored added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jun 10, 2026
@github-actions github-actions Bot mentioned this pull request Jun 10, 2026
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant