Repository navigation
feat(action): preview contracts, reviewers, and architecture drift - #695
Merged
Merged
Conversation
Adds three preview Action inputs backed by the existing Core engines: - contracts (plan and verify modes): exact-ref contract diff without checkout, a bounded "Contract changes" section, and the breaking-contract-count output. Breaking changes never fail the step. - reviewers (+ reviewers-history-authors): a bounded "Suggested reviewers" section for the changed paths. Names print without "@" and no review is requested. - architecture-drift: a bounded "Architecture drift" section from base/head Git objects (edges, cycles, policy violations, decision disagreements). Missing refs degrade to a warning and a notice. The JSON report contract is unchanged. Bundle rebuilt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Merged
This branch was successfully deployed
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.
Adds preview GitHub Action support for three features that already exist in Core, the CLI and MCP. Each input is off by default. The JSON report contract (
FixMapReportandVerifyResult) does not change: new sections go into the readable report, the step summary and the PR comment, the same way the change-scope and capability sections from #687 do.New inputs and output
contracts: truecompareContractRefsover the exact base and head commits without a checkout. Sets thebreaking-contract-countoutput. A breaking change never fails the step. In verify mode only the existing findings andfail-ondecide that.reviewers: truerouteReviewers, covering the report's changed files (or its ranked context files when nothing changed). Output goes throughreviewRoutingWithoutMentions, so no name is written with@. The Action never requests a review.reviewers-history-authors: falsefixmap reviewers --no-history-authors. Requiresreviewers: true.architecture-drift: truecompareArchitectureRefs: added/removed edges, new and resolved cycles, new policy (boundary) violations and decision disagreements, each list capped at 10.The base-vs-head sections run only on pull requests where both refs are known. If a ref is missing or can't be resolved (for example in a shallow checkout), the job doesn't fail: it prints a
::warning::and a notice that suggestsfetch-depth: 0. Contract reasons and reviewer diagnostics also pass throughwithoutMentions, so a GraphQL@deprecatedin a contract can't notify anyone.reviewersandarchitecture-driftare rejected in verify mode, and all four inputs are rejected in annotate mode. The boolean defaults that GitHub always passes ("false", and"true"forreviewers-history-authors) are not counted as "used".Evidence for the ledger rows (Action parity only)
contractsinput in plan and verify modes. Tests run on a real temporary Git repo where removing an OpenAPI operation gives- Breaking: 1andbreaking-contract-count=1. They also check that HEAD stays on the feature branch with a cleangit status, that verify mode passes with the breaking change, and that a missing base ref, or a run with no PR, degrades to a warning.reviewersandreviewers-history-authorsinputs. Tests use a real repo with.github/CODEOWNERS(@org/everyone,@security-team). The summary shows`security-team` (high; CODEOWNERS)plus the commit author, and neither stdout nor the summary matches a mention pattern. The test client'srequestReviewersis never called. Withreviewers-history-authors: falsethe commit author is dropped.architecture-driftinput. A test on a real repo whose feature branch adds ana ↔ bimport cycle gives- Added edges: 2and- New cycles: 1 (resolved: 0). Both sides are read from Git objects, and the worktree stays clean.test-route-count. With a read-only token (403Resource not accessible), the existing warning prints and the sections andbreaking-contract-countare still present.Held-out evidence and the other open items in these rows are not part of this PR.
Checks run locally
Per the process rules, only the fast checks ran: Action
tsc --noEmit,eslint src test,vitest run(7 files, 75 tests pass),npm run build:action,npm run check:action-metadataandnpm run check:action-bundle. GitHub CI is the full gate. The Git-fixture tests use{ timeout: 30_000 }.The ledger,
CHANGELOG.md, versions and the website changelog are left for the release session.🤖 Generated with Claude Code