Skip to content

PDF: pin craft-pdf and krilla to craft-libs main - #1253

Merged
aiongg merged 2 commits into
storytold:mainfrom
aiongg:pdf-repin
Oct 24, 2026
Merged

aiongg merged 2 commits into
storytold:mainfrom
aiongg:pdf-repin

Conversation

@aiongg

@aiongg aiongg commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Moves craft-pdf and the patched krilla from craft-libs c3487320 to 9f75d3dc (craft-libs#254). The writer gains an input bound: krilla's image decoder refuses a PNG that decodes to more than 1 GiB and reserves its buffers fallibly, so an oversized image is a decode error instead of an unbounded allocation. craft-media and the other craft-libs crates keep their pins.

  • Cargo.toml: both pins move together. craft-pdf enables write-simple-text, because craft-libs made krilla's text shaper opt-in and the text layer and handout page numbers call draw_text.
  • crates/pdf/Cargo.toml: the native-only krilla dependency turns off default features, so native and WASM resolve the same feature set (raster-images, simple-text, plus rayon on native).
  • xtask pdf-deps: the pinned rev and the expected features follow.

Checks

cargo xtask ci at fdc2dcda on Linux, with craft-fonts at 43913056 (the ref CI uses): all 8 steps passed, including pdf-deps and wasm. 1,789 tests passed, 6 skipped.

Summary by CodeRabbit

  • New Features
    • PDF generation now supports writing simple text.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 9aef21e and fdc2dcd.

Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 3
  • Cargo.toml
  • crates/pdf/Cargo.toml
  • xtask/src/pdf_deps.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

Walkthrough

The PDF dependency pins now use a shared updated revision. The selected craft-pdf and Krilla features change, and the dependency validator and tests reflect the new feature requirements.

Changes: PDF dependency configuration

Layer / File(s) Summary
Update PDF dependency pins and features
Cargo.toml, crates/pdf/Cargo.toml
The craft-pdf and Krilla dependencies use the updated revision. craft-pdf enables write-simple-text, and the native-target Krilla dependency disables default features.
Align dependency validation and tests
xtask/src/pdf_deps.rs
The pinned revision, expected feature sets, target validation, test metadata, and invalid-feature cases reflect the updated dependency configuration.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Possibly related issues

Suggested reviewers: skylartaylor

Merge Risk: Minimal · up to fdc2d

The dependency revisions and native/WASM feature checks are aligned, with no established merge-blocking defect.

Security architecture risk: Low · up to fdc2d

The update retains existing dependency restrictions and native/WASM feature checks. No concrete expansion of input reachability or command authority was identified, but the new decoder safeguard and resolved dependency features could not be independently confirmed.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The configuration change reaches PDF writer builds on native and WASM targets. The inspected CLI relationship does not establish any additional attacker-facing entrypoint; upstream decoder exposure was not independently traced.

Trust Boundaries and Controls

  • observed — The existing production dependency boundary remains enforced: traversal excludes dev-only edges and rejects hayro parser packages reachable through production or build dependencies. Existing CARGO/RUSTC environment selection and fixed subprocess arguments are unchanged, rather than newly granted authority.
Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 1 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the primary change: updating the craft-pdf and krilla pins to a craft-libs revision.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 1 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@aiongg
aiongg marked this pull request as ready for review October 24, 2026 02:20
@aiongg
aiongg merged commit b913c4f into storytold:main Oct 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant