You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI: keep the takumi-pdf version out of the PDF band goldens - #2669
The PDF producer carries the takumi-pdf version, takumi-pdf 0.21.0. The Version Packages merge bumped it to 0.21.1, so bands-footer-only.pdf and bands-header-and-footer.pdf changed and Rust Test failed on master. That failure skipped the publish job, which needs pass-test, so the release published nothing. Every later release would fail the same way.
What
pdf_bands.rs writes each digit of the producer version as 0 after the CLI writes the PDF. The string keeps its length, so every byte offset in the PDF stays valid: qpdf --check finds no errors. The goldens now carry takumi-pdf 0.00.0 and change only if the version gains a digit.
Summary by CodeRabbit
Tests
PDF validation now treats producer version differences consistently, helping generated-document checks remain stable across version updates.
The PDF test helper now normalizes version digits after each takumi-pdf producer marker in generated PDFs after a successful CLI run. It writes the modified PDF bytes back to the generated file.
Changes: PDF Test Normalization
Layer / File(s)
Summary
Normalize generated PDF producer versions takumi-cli/tests/pdf_bands.rs
The helper replaces version digits after each takumi-pdf marker with 0, while preserving periods and string length. After a successful CLI run, the render helper applies this normalization to the generated PDF and writes the modified bytes back.
The test helper rewrites the producer version in the generated PDFs. The identifiers derived from that version are left as they were, so the next version bump will likely change the band goldens again and block the release job. Fix this before merging if the aim is to stop version bumps from touching the goldens.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
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
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.
Why
The PDF producer carries the
takumi-pdfversion,takumi-pdf 0.21.0. The Version Packages merge bumped it to 0.21.1, sobands-footer-only.pdfandbands-header-and-footer.pdfchanged and Rust Test failed on master. That failure skipped the publish job, which needspass-test, so the release published nothing. Every later release would fail the same way.What
pdf_bands.rswrites each digit of the producer version as0after the CLI writes the PDF. The string keeps its length, so every byte offset in the PDF stays valid:qpdf --checkfinds no errors. The goldens now carrytakumi-pdf 0.00.0and change only if the version gains a digit.Summary by CodeRabbit