Repository navigation
docs(readme-standard): keep the badge block one band with trailing group comments (issue #3353) - #3391
docs(readme-standard): keep the badge block one band with trailing group comments (issue #3353)#3391luoye-cpu wants to merge 2 commits into
Conversation
…ng group comments Issue VMAFx#3353: each badge group was introduced by an HTML comment on its own line, and a line that starts with an HTML comment opens a CommonMark HTML block that interrupts the badge paragraph, so every adopted README rendered the block as one centred row per group instead of one band. The group comments now trail the first badge line of their own group (the banner line for the first group) in the README exemplar, no line of the block starts with an HTML-comment opener, and docs/README-STANDARD.md prescribes that shape with the reason. The Praetor README-01 audit condition and the adopted-README sweep stay with their own repos per the issue's split. Signed-off-by: luoye-cpu <3412829159@qq.com>
Reviewer's GuideDocumentationMove the README badge-group comments onto badge lines to preserve one continuous rendered band, and document the CommonMark constraint and required format in the standard.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Pull Request Overview
The release badge line must retain its update marker as the final comment; placing the group comment after it may break release automation and verification. This should be corrected before merging.
The documented invariants currently have no automated coverage, so the badge ordering and formatting should be validated with repository checks or focused tests.
About this PR
- Add automated checks for the README badge-group formatting invariants to prevent regressions.
Test suggestions
- Verify README contains no standalone numbered group-comment lines.
- Verify all six group comments trail the intended banner or badge lines and preserve group order.
- Verify the standard documentation contains the trailing-comment rule and CommonMark rendering rationale.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify README contains no standalone numbered group-comment lines.
2. Verify all six group comments trail the intended banner or badge lines and preserve group order.
3. Verify the standard documentation contains the trailing-comment rule and CommonMark rendering rationale.
TIP How was this review? Give us feedback
| <!-- 1 release/version --> | ||
| [](https://github.com/VMAFx/vmafx/releases) <!-- x-release-please-version --> | ||
| <!-- 2 CI/build --> | ||
| [](https://github.com/VMAFx/vmafx/releases) <!-- x-release-please-version --> <!-- 2 CI/build --> |
There was a problem hiding this comment.
🟡 MEDIUM RISK
Move <!-- 2 CI/build --> to the first CI badge line, leaving <!-- x-release-please-version --> as the final comment on the release line.
TIP React 👍 if this review is right, or reply with what's wrong and how it could be better to help improve the reviewer.
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="README.md" line_range="10" />
<code_context>
- <!-- 1 release/version -->
- [](https://github.com/VMAFx/vmafx/releases) <!-- x-release-please-version -->
- <!-- 2 CI/build -->
+ [](https://github.com/VMAFx/vmafx/releases) <!-- x-release-please-version --> <!-- 2 CI/build -->
[](https://github.com/VMAFx/vmafx/actions/workflows/tests-and-quality-gates.yml)
[](https://github.com/VMAFx/vmafx/actions/workflows/libvmaf-build-matrix.yml)
</code_context>
<issue_to_address>
**Release badge version stays stale**
When release-please updates the README for a version bump, the `<!-- 2 CI/build -->` marker follows the `x-release-please-version` marker, so release-please no longer finds the version marker at the end of the badge line and leaves the displayed release version stale. The group marker also appears after the Release badge instead of the first CI badge, so it labels the wrong group.
Move `<!-- 2 CI/build -->` after the Tests badge, leaving `<!-- x-release-please-version -->` at the end of the Release badge line.
Also at `README.md:11`.
</issue_to_address>
### Comment 2
<location path="docs/README-STANDARD.md" line_range="78-83" />
<code_context>
-Each group is introduced by an HTML comment (`<!-- 2 CI/build -->`) so a
-reviewer can check the order without rendering the page.
+Each group carries an HTML comment (`<!-- 2 CI/build -->`) so a reviewer can
+check the order without rendering the page. The comment trails the first badge
+line of its own group (the banner line for the first group) and never starts a
+line of its own: a line that begins with `<!--` opens a CommonMark HTML block
+that interrupts the badge paragraph, and the block then renders as one centred
+row per group instead of one band.
Version badges for languages, toolchains, backends and integrations (C, Go,
</code_context>
<issue_to_address>
**Rendering rationale lacks evidence**
The new paragraph asserts that standalone comments interrupt the badge paragraph and produce separate rows but links no specification, GitHub evidence, or tracked reproducer, so readers cannot verify the documented rendering rule.
Link the relevant CommonMark or GitHub rendering evidence, or add a tracked reproducer for the claim.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: README.md:10
| <!-- 1 release/version --> | ||
| [](https://github.com/VMAFx/vmafx/releases) <!-- x-release-please-version --> | ||
| <!-- 2 CI/build --> | ||
| [](https://github.com/VMAFx/vmafx/releases) <!-- x-release-please-version --> <!-- 2 CI/build --> |
There was a problem hiding this comment.
🟡 Medium · Release badge version stays stale
When release-please updates the README for a version bump, the <!-- 2 CI/build --> marker follows the x-release-please-version marker, so release-please no longer finds the version marker at the end of the badge line and leaves the displayed release version stale. The group marker also appears after the Release badge instead of the first CI badge, so it labels the wrong group.
Move <!-- 2 CI/build --> after the Tests badge, leaving <!-- x-release-please-version --> at the end of the Release badge line.
Also at README.md:11.
Prompt for AI agents
In `README.md` at line 10:
**Release badge version stays stale**
When release-please updates the README for a version bump, the `<!-- 2 CI/build -->` marker follows the `x-release-please-version` marker, so release-please no longer finds the version marker at the end of the badge line and leaves the displayed release version stale. The group marker also appears after the Release badge instead of the first CI badge, so it labels the wrong group.
Move `<!-- 2 CI/build -->` after the Tests badge, leaving `<!-- x-release-please-version -->` at the end of the Release badge line.
Also at `README.md:11`.| Each group carries an HTML comment (`<!-- 2 CI/build -->`) so a reviewer can | ||
| check the order without rendering the page. The comment trails the first badge | ||
| line of its own group (the banner line for the first group) and never starts a | ||
| line of its own: a line that begins with `<!--` opens a CommonMark HTML block | ||
| that interrupts the badge paragraph, and the block then renders as one centred | ||
| row per group instead of one band. |
There was a problem hiding this comment.
⚪ Low · Rendering rationale lacks evidence
The new paragraph asserts that standalone comments interrupt the badge paragraph and produce separate rows but links no specification, GitHub evidence, or tracked reproducer, so readers cannot verify the documented rendering rule.
Link the relevant CommonMark or GitHub rendering evidence, or add a tracked reproducer for the claim.
Prompt for AI agents
In `docs/README-STANDARD.md` at lines 78-83:
**Rendering rationale lacks evidence**
The new paragraph asserts that standalone comments interrupt the badge paragraph and produce separate rows but links no specification, GitHub evidence, or tracked reproducer, so readers cannot verify the documented rendering rule.
Link the relevant CommonMark or GitHub rendering evidence, or add a tracked reproducer for the claim.From docs/principles.md L934-939:
- **C core:** rules 5 and 10 adapt to reference, rendering and diagnostic
validation. Other C-core rules apply to executable examples, not prose.
- **Additions:** `docs/`, root Markdown and [python/README.rst](../python/README.rst)
document behavior with reproducible commands and tracked evidence links.
Keep examples consistent with their implementation language; rendered
tables, equations and diagrams must remain usable without script execution.
lusoris
left a comment
There was a problem hiding this comment.
Requesting changes for two findings in the badge block. Folding the group comments into the badge lines does what this PR sets out to do: the header renders as one band instead of one row per group.
What I checked on head 25f9776:
- Rendering: cmark turns the header into 4 paragraphs, where master gives 8, so the badges now share one band.
- Releases: release-please's generic updater replaces only the first version string on a line marked
x-release-please-version(its pattern is not global), so the extra comment on the Release line does not change what a release rewrites. - Order check: with the labels
1 release/versionand2 CI/buildswapped on this head, Praetor's README-01 check reports no order finding. The same swap on master is reported. Both inline comments explain why and give a layout that restores the check.
Conflict: #3393 also edits the badge block in README.md and the "Badge block" section of docs/README-STANDARD.md. Whichever of the two lands second needs a merge from master, resolved inside the conflict markers.
| <!-- 1 release/version --> | ||
| [](https://github.com/VMAFx/vmafx/releases) <!-- x-release-please-version --> | ||
| <!-- 2 CI/build --> | ||
| [](https://github.com/VMAFx/vmafx/releases) <!-- x-release-please-version --> <!-- 2 CI/build --> |
There was a problem hiding this comment.
Required: <!-- 2 CI/build --> trails the Release badge, which belongs to group 1. The rule this PR adds to docs/README-STANDARD.md says the comment trails the first badge line of its own group, so this comment belongs on the Tests line below:
[](...) <!-- x-release-please-version -->
[](...) <!-- 2 CI/build -->| <div align="center"> | ||
|
|
||
| <img src="docs/assets/vmafx-readme-banner.svg" alt="VMAFx — perceptual video quality assessment, GPU-accelerated and SIMD-tuned" height="120" /> | ||
| <img src="docs/assets/vmafx-readme-banner.svg" alt="VMAFx — perceptual video quality assessment, GPU-accelerated and SIMD-tuned" height="120" /> <!-- README-STANDARD badge block: one band, fixed group order (docs/README-STANDARD.md) --> <!-- 1 release/version --> |
There was a problem hiding this comment.
Required: Praetor's README-01 order check reads only the first HTML comment on a line. Here that is the README-STANDARD badge block note, so the 1 release/version label is never read, and on the Release line the first comment is x-release-please-version. On this head the check finds no group labels at all, which is why a swapped order passes.
Putting the group label first fixes it without changing the rendered page:
<img ... /> <!-- 1 release/version --> <!-- README-STANDARD badge block: one band, fixed group order (docs/README-STANDARD.md) -->With that change and the Tests-line move from the other comment, I ran the check again: it reads groups 1 and 2 in order, reports the planted swap, and reports nothing new on the unswapped page. The cmark output is the same as on this head. A sentence in docs/README-STANDARD.md saying the group label comes before any other comment on its line would keep the next edit from undoing this.
…ge-block-one-band
Summary
Issue #3353, step 1: the badge group comments move from standalone lines to trailing comments, so the header badge block renders as one band again. A line that starts with
<!--opens a CommonMark HTML block that interrupts the badge paragraph — every adopted README following the standard rendered its header as one centred row per group. In theREADME.mdexemplar each group comment now trails the first badge line of its own group (the banner line for the first group), no line of the block starts with an HTML-comment opener, anddocs/README-STANDARD.mdprescribes that shape with the reason. Per the issue's split, the Praetor README-01 audit condition (step 2,internal/readmepresentation/audit.go) and the adopted-README sweep (step 3) stay with their own repos and follow once the standard lands.Type
feat— new featurefix— bug fixperf— performance improvementrefactor— no behavior changedocs— documentation onlytest— test-onlybuild/ci— tooling / infraport— cherry-pick from upstream Netflix/vmafsycl/cuda/simd— backend-specificChecklist
git commit -s; fix a branch withgit rebase --signoff origin/master). See DCO sign-off.make format && make lintis green locally — the two touched files are Markdown; the docs lane that covers them (scripts/docs/check_doc_links.py) passes: 0 findings on the touched pages' links, and no link targets changed./cross-backend-diffand the worst ULP is ≤ 2. — not applicable: two Markdown files only..c/.cpp/.cu/.h/.hpp, it has the appropriate license header (seeCONTRIBUTING.md). — not applicable: no new files.!orBREAKING CHANGE:and the migration path is documented below. — not a breaking change.docs/adr/_index_fragments/<NNNN-slug>.mdand nothing else is touched for the index: do not editdocs/adr/README.md,docs/adr/by-tag/,docs/adr/titles.mdor_order.txt(rendered when pull requests land bymake docs-render; see ADR-2197; the render-only pull request of ADR-3295 is the one exception). — no ADR added.Bug-status hygiene (ADR-0165)
docs/state.mdupdated in this PR with a rowin the appropriate section (Open / Recently closed / Confirmed
not-affected / Deferred), OR the opt-out line described in the comment above. — no state delta: badge-block layout in two Markdown files; no product behaviour, score or gate changes.
Netflix golden-data gate (ADR-0024)
assertAlmostEqual(...)score in the Netflix golden Python tests, except by porting Netflix's own updated assertion verbatim from upstream (value and places as upstream has them, measured against the fork's CPU build first; ADR-1828). — not applicable:python/test/untouched.Deep-dive deliverables (ADR-0108)
AGENTS.mdinvariant note — none added: two Markdown content files carry no rebase-sensitive invariant.Reproducer
Known follow-ups
internal/readmepresentation/audit.go): add the one-paragraph condition with the planted per-line case — issue step 2, Praetor repository.golusoris/.githubpull request 10 keeps its current layout until the standard lands (the issue's out-of-scope note).Part of #3353 (deliberately not
Closes: steps 2 and 3 live outside this repository).Summary by Sourcery
Preserve a single-band README badge layout by adopting trailing group comments in the exemplar and standard.
Enhancements:
Documentation:
Summary by CodeRabbit