Skip to content

feat(api): expose open-PR pressure strategy for contributors - #1187

Closed
jaso0n0818 wants to merge 2 commits into
JSONbored:mainfrom
jaso0n0818:feat/api-open-pr-pressure-strategy
Closed

feat(api): expose open-PR pressure strategy for contributors#1187
jaso0n0818 wants to merge 2 commits into
JSONbored:mainfrom
jaso0n0818:feat/api-open-pr-pressure-strategy

Conversation

@jaso0n0818

Copy link
Copy Markdown
Contributor

Summary

  • Adds GET /v1/extension/contributors/:login/open-pr-pressure — self-scoped, public-safe strategy simulation (open new work / wait / cleanup first) built from cached queue + role context.
  • Adds MCP tool gittensory_simulate_open_pr_pressure and planning prompt gittensory_plan_open_pr_strategy for agent-native pre-submission guidance.
  • Reuses the feat(scoring): simulate open-pr pressure scenarios #348 simulateOpenPrPressure engine via new open-pr-pressure-response + extension-open-pr-pressure shaping layers with forbidden-term redaction.

Test plan

  • npx vitest run test/unit/open-pr-pressure-response.test.ts test/unit/extension-open-pr-pressure.test.ts
  • npx vitest run test/unit/mcp-output-schemas.test.ts -t simulate_open
  • npx vitest run test/integration/api.test.ts -t "contributor extension context"
  • Verified no competing open PR for this surface (original feat(scoring): simulate open-pr pressure scenarios #348 merged the simulator only; no API/MCP exposure yet)
  • Null-safe MCP handler returns extension-shaped payload; private terms redacted in scenario text

Wire the existing queue-pressure simulator into a self-scoped extension
endpoint and MCP tool so agents can compare open-new-work, wait, and
cleanup-first options before submitting another PR.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jaso0n0818
jaso0n0818 requested a review from JSONbored as a code owner June 24, 2026 06:49
@dosubot dosubot Bot added the size:L label Jun 24, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.66%. Comparing base (a82f346) to head (33ab44f).

Files with missing lines Patch % Lines
src/api/routes.ts 81.25% 0 Missing and 3 partials ⚠️
src/mcp/server.ts 78.57% 2 Missing and 1 partial ⚠️
src/signals/extension-open-pr-pressure.ts 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1187      +/-   ##
==========================================
- Coverage   94.68%   94.66%   -0.03%     
==========================================
  Files         157      159       +2     
  Lines       19074    19123      +49     
  Branches     6904     6915      +11     
==========================================
+ Hits        18061    18103      +42     
- Misses        424      426       +2     
- Partials      589      594       +5     

☔ 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.

@dosubot dosubot Bot added the size:L label Jun 24, 2026

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

failing CI (missing test coverage), closing - also merge conflicts.

@JSONbored JSONbored closed this Jun 24, 2026
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.

2 participants