Repository navigation
Run the merge head race through the real gateway and github-mcp-server - #242
arpanghoshal wants to merge 5 commits into
Conversation
A reader of github/github-mcp-server#3230 ran the PR-merge head race against Control.execute with a fake provider and asked which row changes through the gateway. This runs it through the real stack: ctrlrun gateway in front of github-mcp-server 1.14.0 in http mode, in front of a fake GitHub REST API that keeps the merge endpoint's sha semantics. Eleven scenarios, three of them with no gateway as the control. Through the gateway an approved merge without expectedHeadSha lands at a head nobody approved, because the gateway has no precondition recheck. With it, GitHub refuses the stale merge and the SHA is bound into the approval. The run also records three gaps: a GitHub 409 and a lost reply are indistinguishable to the gateway, not_executed_on_error is false for this server, and requiring an argument only works through the absent-argument fallback. A fourth: the gateway's pre-check refusals leave no receipt and no event. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Arpan Ghoshal <contact@arpanghoshal.com>
Written by ctrlrun-docs tools/docs_audit/render_cookbook.py from docs/cookbook/github-merge-agent.mdx. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Arpan Ghoshal <contact@arpanghoshal.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (8)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughAdds a cookbook example with a policy for approving pinned GitHub merge requests. Adds a research harness with a fake GitHub endpoint to compare direct and gateway merge scenarios, and records observed outcomes for head changes, stale SHA responses, approvals, and retries. ChangesGitHub merge-head behavior
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~45 minutes Change: Other Sequence Diagram(s)sequenceDiagram
participant ExperimentRunner
participant CTRLRunGateway
participant GitHubMCPServer
participant FakeGitHub
participant SQLiteStateStore
ExperimentRunner->>CTRLRunGateway: Send merge tool call
CTRLRunGateway->>GitHubMCPServer: Forward merge call
GitHubMCPServer->>FakeGitHub: Send GitHub merge request
FakeGitHub-->>GitHubMCPServer: Return result, error, or dropped response
GitHubMCPServer-->>CTRLRunGateway: Return tool result
CTRLRunGateway-->>ExperimentRunner: Return response
ExperimentRunner->>SQLiteStateStore: Read effect, action, and receipt records
Merge Risk: ⚪ Minimal · up to No actionable merge-blocking issue remains; the documented experiment can proceed with normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)Full details: Docstring CoverageExplanation Docstring coverage is 6.38% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 47 functions across 3 files. (5 skipped: 5 unsupported.)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Arpan Ghoshal <contact@arpanghoshal.com>
…erals CodeQL reads an implicit string concatenation inside a list as a missing comma. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Arpan Ghoshal <contact@arpanghoshal.com>
A reader of github/github-mcp-server#3230 ran the PR-merge head race against
Control.executewith a fake provider and asked which row changes through the gateway.research/github-merge-head-race/answers that through the real stack:ctrlrun gateway→ github-mcp-server 1.14.0 (http) → a fake GitHub REST API that keeps the merge endpoint'sshasemantics. Eleven scenarios, three with no gateway as the control. Results are fromctrlrun[gateway]==0.12.2off PyPI and matchmainat1c02d1e.What it found:
expectedHeadSha, an approved merge lands at a head nobody approved. The gateway has no precondition recheck (SPEC-v0.7 §6.4).409and a dropped connection the same way (isError+ text), so the gateway records bothambiguous.mcp: {not_executed_on_error: true}is false for this server: it recordedfailedfor a merge that landed.expectedHeadShaworks only through the absent-argument fallback: Gateway: an absent argument is not a typo, so let a policy require one #239.The second commit is the
github-merge-agentrecipe, extracted from CTRLRun/ctrlrun-docs byrender_cookbook.py; its page is in the companion docs PR.Tests:
test_cookbook.py,test_examples.py,test_repository_signals.pyandtest_packaging.pypass (273). The full suite locally has 14 failures, none from this change: 12 intest_hop.py, fixed by #241, and 2T221connect-timeout tests that only fail on macOS 27, fixed onmacos-27-full-backlog-rst. Merge #241 first, or this PR's CI goes red on the hop tests.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation