Report merge status in get_pull_request #162
Loading…
Reference in a new issue
No description provided.
Delete branch "oss-oo/gateway-pr-merged-20261027"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
get_pull_requestreturnsstateandmergeable, but not whether a pull request was merged. A closed PR is either merged or abandoned, andmergeabledescribes neither, so an agent cannot tell a landed change from a closed one through the gateway (for example before deleting a branch, which the fleet rules tie tomerged == true).Reproduction (live, 2026-10-27, gateway as the agent identity
claude, REST anonymous)GET /repos/OSS-OO/laboratory/pulls/Nget_pull_requestmerged: true,merged_at2026-10-26T21:32:44Z,merge_commit_sha708c16d7…state: closed,mergeable: true, no merge fieldsmerged: false,merged_at: null,merge_commit_sha: nullstate: closed,mergeable: true, no merge fieldsThe two answers are identical in every field a caller could use to tell them apart.
Change
agent-gateway/mcp_forgejo.py:get_pull_requestaddsmerged,merged_atandmerge_commit_shafrom Core's own response (HasMerged→merged, always sent; the other two are set only once the PR has merged, seeservices/convert/pull.go).mergedis reported only as Core's boolean; anything else isnulland never inferred fromstate,merged_atormerge_commit_sha.merged_atmust be an RFC 3339 time andmerge_commit_shaa full SHA-1/SHA-256 object ID (the existingnative_sharule, now shared); malformed values arenull. The catalog description now reads "Fetch one pull request with state, merge status and mergeability."agent-gateway/README.md: the tools table and a paragraph on merge status.agent-gateway/test_pull_request.py(offline, CI step "Gateway native PR evidence contract tests"): merged PR, closed unmerged PR (withmergeabletrue and false), no coercion of non-boolean flags, validation ofmerged_atandmerge_commit_sha, and the catalog description. The five new cases fail againstmain(2 failures, 36 errors) and pass with the change; the eight existing ones are unchanged.agent-gateway/test_mcp.py(e2e): reads the PR thatscripts/e2e-local.shmerged and a PR that it opens and closes without merging, against the real fork image.Verification gate
scripts/e2e-local.shran on exactly this tree (diff hash checked before the commit) in an isolated copy (own compose project, host ports 8941–8943) against the station's fork imageforgejo-oo:v17.0.0-dev-581-g2e0ea7cea-oo13:get_pull_request merge status ok (#1 merged as ca3be48c2231, #4 closed unmerged), followed byMCP GATEWAY PASS;main;missing or ambiguous evidence headers. Unmodifiedmainstops at the same step with the same error on this image: it predates Core's diff evidence headers, so the station image needs the newer Core build before the remaining steps can run. Teardown was verified.Offline suites run locally:
test_pull_request.py(normal and-O),test_listing.py,test_public.py,test_issues.py,test_file_reads.py,test_pull_request_diff.py,test_agent_work_grants.py,test_adoption.py,git diff --check.Contract note
The description change alters the authenticated catalog. The shared catalog fixtures of the client plugins are pinned to
708c16d, which is what https://oss-oo.io/mcp serves today; they move to the merge commit once this change is deployed. Nothing is deployed by this PR; the deployment follows the house's release chain.Part of the family's plugin experiments (experiment 8, gateway gaps).
🤖 Generated with Claude Code
a808f6a53c59507364325d60614ed1851aca6ed9Status, 2026-10-27 evening (
claude):851aca6.main00435ff, now851aca6.scripts/e2e-local.shran isolated (own compose project, ports 8941–8943, byte-identical copy) on the station's imageforgejo-oo:v17.0.0-dev-581-g2e0ea7cea-oo13: 65 steps, the same sequence and the same 36 passes as unmodifiedmain. The new stepget_pull_request merge status okpassed, as didMCP GATEWAY PASSandREMOTE MCP PASS. A first run on this candidate stopped earlier, at the 600-GET budget probe (62.4 s against the 60 s window, load average 15); a second run at lower load took 45.5 s and passed that step.maindoes. By the owner's decision this PR waits for the new Core image on the station; then the full gate runs on the exact candidate and the PR is merged. No Go build on the workstation.🤖 Generated with Claude Code
Consolidated in #165, protected squash merge
82357b4cd1675359119148219b86df78613920fc. The integrated source includes the independently reviewed replacement for this proposal, plus the subsequent fixes and combined native acceptance. Required PR and main-branch checks are green.Closing this original PR as superseded; its branch and original contribution remain available for provenance. This is source integration only: the production rollout is still pending.
Pull request closed