docs: reference PR #684 in the Tauri parity-preflight CHANGELOG entry - #685
Conversation
The doc-metrics completeness gate (subject of #674, recurred around #678/#679) failed on resulting main because the Unreleased entry for the parity-preflight job didn't reference its PR number - the entry that used to cite it was removed while reverting the unrelated Dependabot multi-ecosystem grouping attempt in the same PR.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the Unreleased changelog entry for the parity-preflight CI/CD change with its missing PR #684 reference, allowing the doc-metrics completeness gate to associate the entry with the originating change. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
π€ CodeAnt AI β Review Status
|
Thanks for using CodeAnt! πWe're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X Β· |
π CodeAnt Quality Gate ResultsCommit: β Overall Status: PASSEDQuality Gate Details
|
There was a problem hiding this comment.
No application code in the PR β skipped Code Health checks.
See analysis details in CodeScene
Quality Gate Profile: The Bare Minimum
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
CodeAnt Nitpicks1 code suggestion1. This says no repository code runs on an unverified tag, but the verification job checks out that tag and runs
|
|
Warning Review limit reachedNext included review available in 24 minutes. View limit detailsLimit details: Youβve used the included review currently available. Your 81 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: βοΈ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Essentials Run ID: π Files selected for processing (1)
Comment |
Codecov Reportβ
All modified and coverable lines are covered by tests. π’ Thoughts on this report? Let us know! |
#705) * fix(ci): require pre-merge CHANGELOG PR-reference for governed changes scripts/check-doc-metrics.mjs's completeness gate only enforces a PR-number reference in CHANGELOG.md's [Unreleased] section AFTER squash-merge, once the commit is on main and its subject already carries "(#N)" β pre-merge, a branch's own not-yet-squashed commits are (correctly) exempted from that check. This has left a recurring blind spot: nothing stops a governed PR from merging without ever adding the entry, even though its real PR number is already knowable via the GitHub API before merge. It has recurred three times (#678->#679, #684->#685, #699->#700), each requiring a same-pattern follow-up PR to add the missing reference after the fact. Adds a new, independent pre-merge admission gate (.github/workflows/pr-changelog-reference.yml + scripts/check-pr-changelog-reference.mjs) that fails a governed (feat|fix| perf) PR's CI unless CHANGELOG.md's [Unreleased] section already references it as "PR #<N>", using the PR number from GitHub's own event payload β not inferred from commit history. Deliberately stricter grammar than the existing post-merge bare "#NNN" matcher, since pre-merge there is no squash-appended "(#NNN)" to anchor on. Mirrors pr-text-attribution.yml's base-ref self-grading pattern (runs the checker from the PR's base ref, with a documented one-time bootstrap fallback) so a PR cannot weaken the check that grades it. The existing scanUnreleasedTruth machinery in check-doc-metrics.mjs β governing local pre-push behavior and the historical post-merge/branch-local exemption β is untouched. Complements, but does not implement, issue #675's broader deterministic- identifier-contract scope (replacing the unnumbered-commit slug-match fallback) β this gate only closes the narrower pre-merge admission gap for PRs that already have a real, known PR number, which is the common case. 13 regression tests plus real-text fixtures reproducing all three historical incidents (#678/#679, #684/#685, #699/#700) in tests/unit/checkPrChangelogReference.test.ts. * docs: reference PR #705 in the CHANGELOG PR-admission gate entry * test: reduce duplication in checkPrChangelogReference regression tests CodeScene flagged the new test file's code health below 10.00 due to repeated per-test literal boilerplate. Factored a shared fixture builder and consolidated closely related cases into it.each() tables β same 18 assertions, same coverage, no behavior change to the checker itself. * docs: sync README test-count metrics after test-file refactor * fix(ci): scope CHANGELOG PR-reference check to actual bullet entries The check previously tested the whole raw [Unreleased] section text, so a PR number mentioned only in prose (e.g. a reviewer note directly under a ### heading, not inside a real release-note bullet) could satisfy admission without ever adding a genuine changelog entry. Scoped to parsed bullet entries (joining soft-wrapped continuation lines, mirroring check-doc-metrics.mjs's splitUnreleasedEntries) so only a reference inside an actual bullet counts. Mutation-tested: reverted to whole-section matching, confirmed exactly the new prose-bypass regression test failed, restored. * fix(ci): close two review-found bypasses in the CHANGELOG PR-reference gate - isReferencedByPrLabel used (?!\d) as its trailing boundary, so a malformed near-miss like "PR #705alpha" or "PR #705_internal" satisfied the gate. Widened to (?!\w), a full word boundary, matching the existing post-merge checker's own boundary discipline. - extractBulletEntries appended any non-blank line to the current bullet as a soft-wrap continuation, including a Markdown heading with no blank line before it β so a heading like "### Notes: PR #700" right after an unrelated bullet could satisfy the gate. Now flushes the current entry on a heading line before the continuation check. Also fails closed (instead of silently skipping) when a pull_request event payload is missing its numeric "number" field, rather than treating that the same as a genuinely absent pull_request event. 5 new regression tests (word-boundary near-misses x2, heading-continuation bypass, doubling as the mutation-tested proof for both fixes). * fix(ci): strip comments before locating the [Unreleased] heading getUnreleasedSectionText searched for the heading in the raw changelog, then stripped HTML comments from the extracted section afterward. A commented-out template containing a literal "## [Unreleased]" line earlier in the file could hijack the section-boundary search β slicing off the opening "<!--" before comment-removal ran left the fake section's own placeholder content unstrippable, so a bogus "PR #<N>" inside the comment could satisfy the gate while the real [Unreleased] section had no reference at all. Strips comments from the whole document up front instead, before any heading/section parsing. Regression test reproduces the exact scenario; mutation-tested by reverting to the old order and confirming exactly that test fails. * fix(ci): reject malformed PR metadata and generalize bullet-continuation scoping - isValidPrMetadata (extracted for testability) now rejects a non-integer, zero, or negative PR number, and a missing/blank title, instead of only checking typeof number === 'number' (which admits NaN and negative values). Fails closed instead of silently exit-0'ing on a malformed event payload. - extractBulletEntries's heading-only flush was one instance of a broader bug class: any flush-left non-bullet line (blockquote, code fence, hr) was still absorbed as a continuation. Replaced with the general rule this project's own CHANGELOG entries already follow: a continuation line must be indented. A flush-left line that isn't a new bullet ends the current entry, without enumerating every Markdown block type individually. New regression tests for both, plus a blockquote-continuation case mirroring the heading one. Mutation-tested: each fix reverted individually, confirmed exactly its own tests fail, restored. * refactor(ci): extract isIndentedContinuation to simplify extractBulletEntries CodeScene flagged extractBulletEntries' compound boolean condition as too complex. Named predicate, no behavior change β all 32 existing tests pass unmodified.
User description
Purpose
Resulting-main CI/CD failed after #684 merged: the doc-metrics completeness gate (
scripts/check-doc-metrics.mjs, the subject of #674, recurred around #678/#679) requires every post-tagfeat/fix/perfcommit to be referenced inCHANGELOG.md's[Unreleased]section by PR number or subject. The parity-preflight entry existed and described the change accurately but had its PR-number reference dropped while reverting the unrelated Dependabot multi-ecosystem grouping attempt from the same PR.Fix
Append "PR #684." to the existing Unreleased entry, matching the established convention.
Validation
node scripts/check-doc-metrics.mjsβ passes locally.pnpm run ci:prepushβ full local admission gate passes.Summary by Sourcery
Documentation:
CodeAnt-AI Description
Reference PR #684 in the unreleased parity-preflight changelog entry
What Changed
[Unreleased]changelogImpact
β Complete changelog attributionβ Successful documentation completeness checksπ‘ Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
Summary by cubic
Adds the missing PR #684 reference to the Tauri parity-preflight CHANGELOG entry so the doc-metrics completeness gate passes on main. The reference was dropped when an unrelated Dependabot revert was applied.
Written for commit 893da90. Summary will update on new commits.