Repository navigation
feat(mcp): pass an optional generation through mark_pr_fix - #1081
Merged
Merged
Conversation
joryirving
force-pushed
the
feat/mcp-mark-generation
branch
from
September 26, 2026 20:43
f405906 to
2e836c5
Compare
Contributor
There was a problem hiding this comment.
AI Automated Review
Full PR review.
Analysis engine: MiniMax-M3@https://litellm.jory.dev/v1 (anthropic) — primary route
Recommendation
Approve. This is a minimal, backward-compatible extension to the MCP mark_pr_fix tool that adds an optional generation parameter and threads it through markPrFix to the /api/pr-fix-queue/mark endpoint. All CI checks (lint, typecheck, tests, build, Docker builds, migrations, coverage) are green, the change matches the linked intent, and no secrets, migrations, or auth-bearing paths are touched.
Change-by-change findings
src/lib/mc-client.ts (1 addition)
markPrFixinput gainsgeneration?: number. The field is forwarded as part of the existing JSON body viamcJson/POST. Because the field is optional and the existingmcJsonhelper spreads/serializes the input object, omittinggenerationpreserves today's wire format exactly — the PR body is correct.
src/mcp/server.ts (7 additions)
markPrFixHandlernow passesgeneration: args.generation as number | undefinedintomarkPrFix.- The tool's Zod schema gains
generation: z.number().int().positive().optional()with a description that explicitly references PR 1074/PR 1079. The type castas number | undefinedis safe because Zod has already validated the argument. - No other tools, transport wiring, or auth logic is touched.
src/lib/mc-client.test.ts (12 additions)
- A new test asserts that when
generation: 3is passed, the POST body to/api/pr-fix-queue/markincludes{ repo, pr, status, generation: 3 }. This is a direct test of the new pass-through behavior at the HTTP boundary.
Sources
- PR body explains the motivation (Refs PR 1074) and forward-compat with PR 1079.
- Diff is confined to
src/lib/mc-client.ts,src/lib/mc-client.test.ts,src/mcp/server.ts. - CI: all checks green (lint, typecheck, tests, build, Docker builds, migrations, coverage, smoke, npm audit, database integration).
Standards Compliance
- Tech stack (Next.js/TypeScript), no secrets introduced, no migrations, no auth changes, no label/PR contract changes. Optional Zod field with
.optional()matches the codebase's standard incremental schema-extension pattern. No conflict with AGENTS.md.
Tool Harness Findings
- The tool harness section is present but reports that the native tool-calling loop issued no tool calls and no evidence was gathered. Nothing to report.
Unknowns or Needs Verification
- The corpus does not include the body of PR 1074 or PR 1079 (no linked issue context provided). I cannot verify against issue-level acceptance criteria beyond what the PR body states; however, the change is small, backward-compatible, and CI-clean, so this is low risk.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1074.
mark_pr_fixcalls/api/pr-fix-queue/markwith the agent bearer token, and #1079 rejects bearer marks withoutgeneration, so the MCP tool would 400 on every call once #1079 ships. This adds an optionalgenerationinput and passes it through. Nothing changes until a caller supplies it, so it's safe to merge ahead of #1079.