Repository navigation
ci: a behavior-change gate: every PR says if it changes behavior for callers - #208
Merged
groupsky merged 2 commits intoNov 17, 2026
Merged
Conversation
…callers Fixes #197 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
groupsky
marked this pull request as ready for review
November 17, 2026 18:46
groupsky
deleted the
hq-job/nodkey-release-ci-1/r-20261117-203018-cc7d
branch
November 17, 2026 18:46
This was referenced Nov 17, 2026
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.
What and why
Fixes #197
0.6.0 changed a default that callers depend on (#171), and the release notes listed it as a plain feature (#191). This pull request adds a gate, so that such a change is visible:
.github/pull_request_template.mdwith the lineChanges behavior for existing callers: yes or no(the placeholder fails until the author answers).tools/prgate: the check. It runs as more steps of the job Conventional Commits title inpr-title.yml, so it is already a required check. It fails when:yesand the title has no!;yesand the PR adds no## Updating from Xsection todocs/updating.md;noand the title has a!(one more rule, so the two cannot disagree);test/contract/and the answer isno. A new*_test.gofile right intest/contract/and a change to itsREADME.mddo not count: a new test pins behavior that callers already have. (As first written, the rule would have made test: contract tests for how callers use nodkey run (pipe, parent process, signals, exit codes, fds) #198's PR, which only adds tests of today's behavior, sayyesand add!.) Any other new file there counts, such as ago.modor a file intestdata/.CHANGELOG.mdand the manifest), and a Dependabot PR with no!that changes only dependency files.docs/updating.md, starting with the feat(run): mask fetched values by default; --no-mask turns it off #171 section ("Updating from 0.5.0 or older").docs/setup.md(section 13) links to it.docs/releasing.md: the gate, and "⚠ BREAKING CHANGES". The squash commit keeps the!: the repository setting uses the PR title as the squash commit message (checked 2026-11-17).One point beyond the issue
The issue says the check reads only the title, the body and the changed file names. To know that the PR adds an "Updating from X" section, the check also reads the diff of
docs/updating.md(only that file), as text from the GitHub API. It never runs or prints it. The workflow checks out and runs onlymain(github.shaofpull_request_target), never code of the PR. It never prints PR text to the log.Note:
pull_request_targetruns the workflow ofmain, so the gate does not run on this PR. It starts with the next PR after the merge.Behavior for callers
Changes behavior for existing callers: no
Tests
tools/prgate/main_test.go: a test for each fail case, the pass cases, the bot exemptions and attempts to fake them, the template, the headings ofdocs/updating.md, and the exit codes.go test -race ./...,go vet ./...,golangci-lint run --build-tags e2e, actionlint onpr-title.yml..claude/agents/security-reviewer.md): no critical, high or medium finding. Its four low findings are fixed (only the diff ofdocs/updating.mdis kept, a tighter Dependabot exemption, no link to a missing file, onlyghgets the token). A second round on the contract rule found one low point (a new non-test file could change the tests); fixed.Progress
docs/updating.mdwith the feat(run): mask fetched values by default; --no-mask turns it off #171 sectiondocs/releasing.mddescribes the gate🤖 Generated with Claude Code