Repository navigation
ci: rework the pull request template after the bug report form - #1678
Merged
Merged
Conversation
The pull request template asked only "What and why" and "Validation", kept its guidance for changed tests and OpenVMM pins in a comment after them, and told authors to add the tests-modified label, which the Test changes workflow now adds and removes by itself. Merged pull requests added what the template did not ask for under headings of their own: what a change leaves out, its rejected alternatives, its compatibility, the environment of each run, its changed tests, and its OpenVMM pin. Ask the Bug report form's questions of a change instead: what it changes, why it is needed, and how it was validated, with the backend, host OS, host type, and guest of each run and the gates left to CI. Add a checklist for tests, changes to existing tests, documentation, the public API snapshots, and compatibility, each with the command that checks it, and name the conditional "Changes to existing tests" and "OpenVMM pin" sections in a closing comment, with the CLA note. Remind authors to redact what they paste and to report vulnerabilities privately. The guidance stays in HTML comments, so an unfilled template renders as empty sections, and links nothing relative, since a pull request body resolves no relative link to a repository file. doc/contribute.md, copilot-instructions.md, and the nvx-fix-issue, nvx-promote-openvmm-pin, and nvx-rebase-openvmm-chain skills name the new sections, and say that the workflow adds tests-modified. PullRequestTemplateTests pins the rendered sections and their order, the commented conditional sections, and the sections that the Pull request body row of doc/contribute.md names. All three fail at origin/dev 6f3faa4 and pass with this change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the pull request template and contributor-guidance updates.
No open issues 🎉
What changed in this PR
Reworks NVX’s pull request template to mirror the bug report form, helping contributors describe changes, explain validation, and address compatibility consistently.
Changes:
- Adds separate change, rationale, and validation questions, a checklist, and security reminders.
- Aligns contributor documentation and agent skills with the new sections and automatic
tests-modifiedlabeling. - Adds tests for heading order, comment visibility, the unfilled template, and documentation consistency.
| File | Description |
|---|---|
scripts/test_label_issues.py |
Adds template structure and documentation consistency tests. |
doc/contribute.md |
Documents the new required and conditional sections. |
.github/skills/nvx-rebase-openvmm-chain/SKILL.md |
Aligns release PR guidance with the template sections. |
.github/skills/nvx-promote-openvmm-pin/SKILL.md |
Maps pin-promotion details to the new sections. |
.github/skills/nvx-fix-issue/SKILL.md |
Updates PR guidance and removes manual labeling instructions. |
.github/pull_request_template.md |
Adds question headings, checklist items, and security reminders. |
.github/copilot-instructions.md |
Names the test-change section and clarifies automatic labeling. |
Review effort: Balanced
5 tasks done
Pedro Henrique Penna (ppenna)
marked this pull request as ready for review
November 17, 2026 02:27
Pedro Henrique Penna (ppenna)
added a commit
that referenced
this pull request
Nov 17, 2026
doc/contribute.md asks every pull request to reference an issue on the first line of its description, but nothing checks it: pull requests such as #1675, whose only references sit in the template's HTML comment, and #1516, whose Refs #1509 names a pull request, reference no issue, and a reviewer has to notice. Add the Issue link workflow, which pull_request_target runs, from the default branch, when a pull request is opened, reopened, pushed to, edited, labelled, or unlabelled. Its script, check_issue_link.py, reads the pull request through gh api and passes it when GitHub links it to an issue of the repository (closingIssuesReferences) or when its description holds close, fix, resolve (in any form), Part of, or Refs, with an optional colon, then #N, microsoft/nvx#N, or the issue's URL, where N is an issue. A pull request's number, a missing number, a bare #N, another repository's issue, and references in HTML comments or Markdown code do not count, nor does a keyword that one of them or the end of a block separates from its number: the script reads quotes, lists, headings, code, and comments as CommonMark does. It looks up at most the first 10 numbers, so a description cannot make it call the API without bound. Pull requests by dependabot[bot] or github-actions[bot], or labelled no-issue, are exempt, and closed ones are left alone. An unlinked pull request gets the needs-issue label and one marker comment that says how to reference an issue, and the check fails; editing the description reruns it, which then removes the label and rewrites the comment. Only a comment of github-actions[bot] that starts with the marker is the script's. The script does every read before its first write, so an API error fails the check and changes nothing, and its summary names the verdict and the numbers, never the description. The job has no condition, since a skipped run would replace the previous verdict, runs one check a pull request at a time, keeps no checkout credentials, and gets only the pull request's number. Its token reads contents and writes pull requests; reading an issue of a public repository needs no issues permission, so the nightly report and issue labelling stay the only workflows that write issues. Evidence: dry runs against the live repository pass #1678, which GitHub links to #1677, flag #1675, #1516, and #1509, as reading their descriptions confirms, and leave merged pull requests such as #1672 alone; before they merged, they passed #1674, which GitHub linked to #1666, and flagged #1671. test_issue_link.py covers the parser, with indented code, fences that end with their container, and hidden text or a block end between a keyword and its number; the verdicts and the writes through a fake gh api, the bound on lookups, an API error at each read, a comment that quotes the marker, and the workflow's triggers, permissions, checkout, concurrency, and inputs. validate-nvx runs it on Linux and Windows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pedro Henrique Penna (ppenna)
deleted the
agents/issue-1677-pr-template
branch
November 17, 2026 02:57
Pedro Henrique Penna (ppenna)
added a commit
that referenced
this pull request
Nov 17, 2026
doc/contribute.md asks every pull request to reference an issue on the first line of its description, but nothing checks it: pull requests such as #1675, whose only references sit in the template's HTML comment, and #1516, whose Refs #1509 names a pull request, reference no issue, and a reviewer has to notice. Add the Issue link workflow, which pull_request_target runs, from the default branch, when a pull request is opened, reopened, pushed to, edited, labelled, or unlabelled. Its script, check_issue_link.py, reads the pull request through gh api and passes it when GitHub links it to an issue of the repository (closingIssuesReferences) or when its description holds close, fix, resolve (in any form), Part of, or Refs, with an optional colon, then #N, microsoft/nvx#N, or the issue's URL, where N is an issue. A pull request's number, a missing number, a bare #N, another repository's issue, and references in HTML comments or Markdown code do not count, nor does a keyword that one of them or the end of a block separates from its number: the script reads quotes, lists, headings, code, and comments as CommonMark does. It looks up at most the first 10 numbers, so a description cannot make it call the API without bound. Pull requests by dependabot[bot] or github-actions[bot], or labelled no-issue, are exempt, and closed ones are left alone. An unlinked pull request gets the needs-issue label and one marker comment that says how to reference an issue, and the check fails; editing the description reruns it, which then removes the label and rewrites the comment. Only a comment of github-actions[bot] that starts with the marker is the script's. The script does every read before its first write, so an API error fails the check and changes nothing, and its summary names the verdict and the numbers, never the description. The job has no condition, since a skipped run would replace the previous verdict, runs one check a pull request at a time, keeps no checkout credentials, and gets only the pull request's number. Its token reads contents and writes pull requests; reading an issue of a public repository needs no issues permission, so the nightly report and issue labelling stay the only workflows that write issues. Evidence: dry runs against the live repository pass #1678, which GitHub links to #1677, flag #1675, #1516, and #1509, as reading their descriptions confirms, and leave merged pull requests such as #1672 alone; before they merged, they passed #1674, which GitHub linked to #1666, and flagged #1671. test_issue_link.py covers the parser, with indented code, fences that end with their container, and hidden text or a block end between a keyword and its number; the verdicts and the writes through a fake gh api, the bound on lookups, an API error at each read, a comment that quotes the marker, and the workflow's triggers, permissions, checkout, concurrency, and inputs. validate-nvx runs it on Linux and Windows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pedro Henrique Penna (ppenna)
added a commit
that referenced
this pull request
Nov 17, 2026
doc/contribute.md asks every pull request to reference an issue on the first line of its description, but nothing checks it: pull requests such as #1675, whose only references sit in the template's HTML comment, and #1516, whose Refs #1509 names a pull request, reference no issue, and a reviewer has to notice. Add the Issue link workflow, which pull_request_target runs, from the default branch, when a pull request is opened, reopened, pushed to, edited, labelled, or unlabelled. Its script, check_issue_link.py, reads the pull request through gh api and passes it when GitHub links it to an issue of the repository (closingIssuesReferences) or when its description holds close, fix, resolve (in any form), Part of, or Refs, with an optional colon, then #N, microsoft/nvx#N, or the issue's URL, where N is an issue. A pull request's number, a missing number, a bare #N, another repository's issue, and references in HTML comments or Markdown code do not count, nor does a keyword that one of them or the end of a block separates from its number: the script reads quotes, lists, headings, code, and comments as CommonMark does, and lets a comment run across blocks, as a browser does, until raw HTML ends it. It looks up at most the first 10 numbers, so a description cannot make it call the API without bound. Pull requests by dependabot[bot] or github-actions[bot], or labelled no-issue, are exempt, and closed ones are left alone. An unlinked pull request gets the needs-issue label and one marker comment that says how to reference an issue, and the check fails; editing the description reruns it, which then removes the label and rewrites the comment. Only a comment of github-actions[bot] that starts with the marker is the script's. The script does every read before its first write, so an API error fails the check and changes nothing, and its summary names the verdict and the numbers, never the description. The job has no condition, since a skipped run would replace the previous verdict, runs one check a pull request at a time, keeps no checkout credentials, and gets only the pull request's number. Its token reads contents and writes pull requests; reading an issue of a public repository needs no issues permission, so the nightly report and issue labelling stay the only workflows that write issues. Evidence: dry runs against the live repository pass #1678, which GitHub links to #1677, flag #1675, #1516, and #1509, as reading their descriptions confirms, and leave merged pull requests such as #1672 alone; before they merged, they passed #1674, which GitHub linked to #1666, and flagged #1671. Each parser case also agrees with what GitHub's Markdown API renders, apart from a reference that a comment splits and a pull request's URL. test_issue_link.py covers the parser, with indented code, fences that end with their container, setext headings, sibling list items, comments that outlast their block or end as a browser ends them, and hidden text or a block end between a keyword and its number; the verdicts and the writes through a fake gh api, the bound on lookups, an API error at each read, a comment that quotes the marker or has no author, and the workflow's triggers, permissions, checkout, concurrency, and inputs. validate-nvx runs it on Linux and Windows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pedro Henrique Penna (ppenna)
added a commit
that referenced
this pull request
Nov 17, 2026
doc/contribute.md asks every pull request to reference an issue on the first line of its description, but nothing checks it: pull requests such as #1675, whose only references sit in the template's HTML comment, and #1516, whose Refs #1509 names a pull request, reference no issue, and a reviewer has to notice. Add the Issue link workflow, which pull_request_target runs, from the default branch, when a pull request is opened, reopened, pushed to, edited, labelled, or unlabelled. Its script, check_issue_link.py, reads the pull request through gh api and passes it when GitHub links it to an issue of the repository (closingIssuesReferences) or when its description holds close, fix, resolve (in any form), Part of, or Refs, with an optional colon, then #N, microsoft/nvx#N, or the issue's URL, where N is an issue. A pull request's number, a missing number, a bare #N, another repository's issue, and references in HTML comments or Markdown code do not count, nor does a keyword that one of them or the end of a block separates from its number: the script reads quotes, lists, headings, code, and comments as CommonMark does, and lets a comment run across blocks, as a browser does, until raw HTML ends it. It looks up at most the first 10 numbers, so a description cannot make it call the API without bound. Pull requests by dependabot[bot] or github-actions[bot], or labelled no-issue, are exempt, and closed ones are left alone. An unlinked pull request gets the needs-issue label and one marker comment that says how to reference an issue, and the check fails; editing the description reruns it, which then removes the label and rewrites the comment. Only a comment of github-actions[bot] that starts with the marker is the script's. The script does every read before its first write, so an API error fails the check and changes nothing, and its summary names the verdict and the numbers, never the description. The job has no condition, since a skipped run would replace the previous verdict, runs one check a pull request at a time, keeps no checkout credentials, and gets only the pull request's number. Its token reads contents and writes pull requests; reading an issue of a public repository needs no issues permission, so the nightly report and issue labelling stay the only workflows that write issues. Evidence: dry runs against the live repository pass #1678, which GitHub links to #1677, flag #1675, #1516, and #1509, as reading their descriptions confirms, and leave merged pull requests such as #1672 alone; before they merged, they passed #1674, which GitHub linked to #1666, and flagged #1671. Each parser case also agrees with what GitHub's Markdown API renders, apart from a reference that a comment splits and a pull request's URL. test_issue_link.py covers the parser, with indented code, fences that end with their container, setext headings, sibling list items, comments that outlast their block or end as a browser ends them, and hidden text or a block end between a keyword and its number; the verdicts and the writes through a fake gh api, the bound on lookups, an API error at each read, a comment that quotes the marker or has no author, and the workflow's triggers, permissions, checkout, concurrency, and inputs. validate-nvx runs it on Linux and Windows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pedro Henrique Penna (ppenna)
added a commit
that referenced
this pull request
Nov 17, 2026
doc/contribute.md asks every pull request to reference an issue on the first line of its description, but nothing checks it: pull requests such as #1675, whose only references sit in the template's HTML comment, and #1516, whose Refs #1509 names a pull request, reference no issue, and a reviewer has to notice. Add the Issue link workflow, which pull_request_target runs, from the default branch, when a pull request is opened, reopened, pushed to, edited, labelled, or unlabelled. Its script, check_issue_link.py, reads the pull request through gh api, in UTF-8 whatever the locale, and passes it when GitHub links it to an issue of the repository (closingIssuesReferences) or when its description holds close, fix, resolve (in any form), Part of, or Refs, with an optional colon, then #N, microsoft/nvx#N, or the issue's URL, where N is an issue. A pull request's number, a missing number, a bare #N, another repository's issue, and references in HTML comments or Markdown code do not count, nor does a keyword that one of them or the end of a block separates from its number: the script reads quotes, lists, headings, code, and HTML blocks as GitHub's CommonMark does, reads raw HTML as text but for its comments, and lets a comment run across blocks, as a browser does, until raw HTML ends it. It looks up at most the first 10 numbers, so a description cannot make it call the API without bound. Pull requests by dependabot[bot] or github-actions[bot], or labelled no-issue, are exempt, and closed ones are left alone. An unlinked pull request gets the needs-issue label and one marker comment that says how to reference an issue, and the check fails; editing the description reruns it, which then removes the label and rewrites the comment. Only a comment of github-actions[bot] that starts with the marker is the script's. The script does every read before its first write, so an API error fails the check and changes nothing, and its summary names the verdict and the numbers, never the description. The job has no condition, since a skipped run would replace the previous verdict, runs one check a pull request at a time, keeps no checkout credentials, and gets only the pull request's number. Its token reads contents and writes pull requests; reading an issue of a public repository needs no issues permission, so the nightly report and issue labelling stay the only workflows that write issues. Evidence: dry runs against the live repository pass #1678, which GitHub links to #1677, flag #1675, #1516, and #1509, as reading their descriptions confirms, and leave merged pull requests such as #1672 alone; before they merged, they passed #1674, which GitHub linked to #1666, and flagged #1671. Each parser case also agrees with what GitHub's Markdown API renders, apart from a reference that a comment splits, a pull request's URL, and the text of a declaration, which GitHub hides. test_issue_link.py covers the parser, with indented code, fences that end with their container, setext headings, sibling and empty list items, HTML blocks, comments that outlast their block or end as a browser ends them, and hidden text or a block end between a keyword and its number; the verdicts and the writes through a fake gh api, gh's input and output in UTF-8, the bound on lookups, an API error at each read, a comment that quotes the marker or has no author, and the workflow's triggers, permissions, checkout, concurrency, and inputs. validate-nvx runs it on Linux and Windows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Fixes #1677
What does this pull request change?
This PR fills its own description with the new template, so this body shows how the template reads.
The template.
.github/pull_request_template.mdnow has the issue's proposal: What does this pull request change?, Why is this change needed?, How was this change validated?, and Checklist, in that order. The guidance stays in HTML comments, so an unfilled template renders as empty sections plus the checklist. The conditional Changes to existing tests and OpenVMM pin sections and the CLA note sit in a closing comment. The opening comment now asks authors to redact what they paste and to report vulnerabilities privately. The template links nothing relative.Where the sections are named. These now name the new sections:
doc/contribute.md;nvx-fix-issueand step 6 ofnvx-promote-openvmm-pin;copilot-instructions.mdand step 6 ofnvx-rebase-openvmm-chain.Neither the template nor
nvx-fix-issuetells anyone to addtests-modifiedany more. Both say that the Test changes workflow adds it.The test.
PullRequestTemplateTestsinscripts/test_label_issues.py, next toBugReportFormTests, checks:doc/contribute.mdnames the template's sections in order.Where to start: the template, then
doc/contribute.md, then the test.Not in this change:
Co-authored-by: Copilottrailer. The prompt can come later with a policy.check_markdown_links.pywould still accept a relative link that resolves in the repository but not in a pull request body.Why is this change needed?
The old template asked only What and why and Validation. Its guidance for changed tests and OpenVMM pins sat in a trailing comment, and it told authors to add
tests-modified, a label thattest-changes.ymlnow adds and removes by itself. So each merged pull request put the missing information under a heading of its own; the issue's table lists them, from #1641 to #1672. Copilot and the maintainer read the description first, and agents fill the template throughnvx-fix-issueandnvx-promote-openvmm-pin, so its prompts shape their pull requests directly.Rejected alternatives:
.github/PULL_REQUEST_TEMPLATE/. GitHub offers them only through thetemplatequery parameter, so one template keeps the conditional sections in a comment instead.validate-nvxlists everyscripts/test_*.pymodule on both operating systems, so a new module would change those lines, and the Test changes workflow flags changed lines in the actions that run the tests. The test sits next toBugReportFormTestsinstead, since the new template follows that form.How was this change validated?
All checks ran locally on Windows 11 with Python 3.14. This is not a runtime change, so I used no remote host, backend, or guest.
python -m unittest scripts.test_label_issues.PullRequestTemplateTests, with the new test file in a worktree of the base6f3faa4c565(base)contribute.mdrow names no section619ed422c52####heading; the conditional block moved to the top; a section renamed indoc/contribute.md619ed422c52python -m unittest scripts.test_label_issues619ed422c52python scripts/local_gates.py --base origin/dev --run --only test-changes markdown-links test-layout619ed422c52check_test_changes.pylists 0 changes to existing tests and 6 added itemsquality-code:ruff check scripts .github/specula,compileall,pyright --pythonplatform Linux,pyright --pythonplatform Windows,ruff format --checknvx-cli(Windows): everyscripts/test_*.pymodule thatvalidate-nvxlists, run without itspip installstep, with Git'susr\binonPATHandNVX_RSunsetpython scripts\test_adversarial.py,python scripts\nvx.py --helpNot run locally:
shellcheckandshfmtsteps ofquality-code: from Git Bash, MSYS rewrote the container's/workspacepath. This change touches no shell script.NVX_RS-gated tests: no releasenvx-rswas built.Left to CI (this Draft skips them until it is marked ready):
Lint, typing, and formattingon Ubuntu, andNVX CLI / LinuxandNVX CLI / Windows.local_gates.pyselected no MicroVM, benchmark, or OpenVMM CI suite.Checklist
python3 scripts/check_test_layout.pychecks.python3 scripts/check_test_changes.py --base origin/devlists no changeto an existing test, or a Changes to existing tests section below
explains each one.
.github/copilot-instructions.mdand the skills when a convention orworkflow changes.
nvxupdatesnvx-rs/public-api/withpython3 scripts/public_api.py --update.description says how the change versions or migrates them.