Skip to content

feat(tools): model pull-request review/merge as contract:change-request#678

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:feat/change-request-contract
Jul 2, 2026
Merged

feat(tools): model pull-request review/merge as contract:change-request#678
potiuk merged 1 commit into
apache:mainfrom
potiuk:feat/change-request-contract

Conversation

@potiuk

@potiuk potiuk commented Jul 2, 2026

Copy link
Copy Markdown
Member

Why

The deterministic vendor-neutrality scorer marked the whole pr-management
family (and 14 other skills) as portable, because gh pr … matched
contract:tracker — which is green (GitHub + Atlassian/Jira). But Jira only
implements the issue side of tracker; it has no pull-request model. So those
skills were credited with a portability that doesn't exist: PR review/merge
works on GitHub only.

What

  • New contract:change-request — the proposed-change review + merge gate
    (PR / MR / Gerrit change), vendor-backed, GitHub sole backend today.
  • gh pr moves from the tracker usage tokens into change-request;
    tools/github is tagged with the new contract.
  • Register the contract in the skill-and-tool-validator allow-set and add a
    scorer test for GitHub-only change-request coupling; regenerate the
    docs/vendor-neutrality.md block (kept in sync by an existing pytest).

Impact

  • Contracts: 8/10 vendor neutral (80%), was 8/9 (89%) — change-request
    joins mail-draft as the second open gap.
  • Skills with no lock-in: 40/63, was 59/63. The 23 coupled skills each
    become portable as soon as a second forge review/merge backend (GitLab,
    Gitea) ships — no skill code changes; the seam is the contract.

Follow-up in apache/magpie-site will surface these numbers on the /tools page
once this merges.

Raised on apache/magpie-site#17.

🤖 Generated with Claude Code

The vendor-neutrality scorer classified every pr-management skill as
"portable" because they invoke `gh pr`, which matched contract:tracker —
and tracker is green (GitHub + Atlassian). But Jira has no pull-request
model: its adapter covers issues, not PR review/merge. So a skill driving
`gh pr` is coupled to GitHub even though the issue side of tracker is
portable.

Introduce contract:change-request — the proposed-change review + merge gate
(pull request / merge request / Gerrit change) — as a distinct vendor-backed
contract with GitHub as the sole backend today. `gh pr` moves from the
tracker usage tokens into change-request; tag tools/github with it.

Result: 8/10 contracts vendor neutral (was 8/9); change-request joins
mail-draft as the second open gap. 23 skills are vendor-coupled (the 19
that drive `gh pr`, plus the 4 mail-draft ones) — each flips to portable
the moment a second forge review/merge backend (GitLab, Gitea) ships.
Regenerate the docs/vendor-neutrality.md block (a pytest keeps it in sync)
and register the contract in the skill-and-tool-validator allow-set.

Raised on apache/magpie-site#17.
@potiuk potiuk force-pushed the feat/change-request-contract branch from 0c9c379 to a11bb77 Compare July 2, 2026 22:30
@potiuk potiuk merged commit 950efdc into apache:main Jul 2, 2026
32 checks passed
potiuk added a commit that referenced this pull request Jul 2, 2026
…mail patch backends (#669) (#679)

contract:change-request shipped in #678 as a scorer policy entry with
GitHub as the sole backend and no interface tool. This completes it into
a full backend-neutral contract with two more backends, so the
pull-request review/merge gate works on non-GitHub projects.

- tools/change-request/: the interface spec (Kind: interface). Seven
  backend-neutral verbs (list_open, get, get_discussion, post_review,
  land, reject, status), generic lifecycle verbs, and the
  land <-> contract:source-control boundary. Answers the issue's four
  open questions (diff identity, CI/mergeable degradation, apply
  idempotency, patch-author vs committer attribution).
- tools/jira-patch/ (Vendor: Atlassian): patch on a JIRA issue; review
  via JIRA comments; land delegates to asf-svn (svn patch + svn commit).
- tools/mail-patch/ (Vendor: email): [PATCH] thread on dev@; reads via
  mail-archive, replies via mail-draft (never sends); land delegates to
  asf-svn.
- tools/github: retag prose as one change-request backend (land =
  gh pr merge), no longer the sole one.
- skills/pr-management-triage: contract-binding section mapping each
  disposition to a verb; the gh/GraphQL commands are the GitHub
  resolution of those verbs (triage never lands).
- docs + scorer: change-request flips vendor-neutral (3 vendors: GitHub,
  Atlassian, email); score 8/10 -> 9/10; ~19 skills flip vendor-coupled
  -> portable; only mail-draft remains a gap. Regenerate
  docs/vendor-neutrality.md and add a scorer test.

Naming: the issue proposed contract:change-proposal; ships as
contract:change-request to match #678. Same seam; change-request is
canonical.

Closes #669.

Co-authored-by: Tester <t@example.com>
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.

1 participant