Skip to content

fix(ci): restore green build — printpdf 0.9 migration, clippy fix, lockfile drift - #128

Merged
hyperpolymath merged 2 commits into
mainfrom
arena/01a108e5-presswerk
Oct 5, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
arena/01a108e5-presswerk

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Follow-up to #127 (resolves #122). The first full CI compile of the merged FFP stack surfaced three blockers; this fixes all of them.

1. presswerk-document compile failure (E0599) — pre-existing, unmasked

writer.rs still used printpdf 0.8 ops Op::SetFontSizeBuiltinFont / Op::WriteTextBuiltinFont, which upstream removed when printpdf was bumped to 0.9.1 back in #20 (May 2026). The breakage stayed latent because presswerk-core failed to compile first; repairing core in #125/#127 unmasked it. Migrated to the 1:1 PDF operators documented as their replacement in printpdf 0.9:

  • Op::SetFont { font: PdfFontHandle::Builtin(BuiltinFont::Helvetica), size } (Tf)
  • Op::ShowText { items } (Tj/TJ)

2. clippy manual_map in the FFP legacy→v1 bridge

presswerk-core/src/provenance.rs — else if let Some(p) = &legacy.producer { Some(…) } else { None } rewritten as legacy.producer.as_ref().map(…) per clippy's own suggestion. The E0382 repair is preserved (borrow + clone, no moves).

3. CI plumbing

The Governance Actions lockfile verify failure predates this work (every main push since mid-September). This PR fixes the drifts identifiable without the gh-actions-lock tool; deeper reconciliation needs that tooling.

No Rust toolchain is reachable from this workspace, so verification is by careful API audit against printpdf v0.9 sources plus CI on this PR.

…le drift

Follow-up to #127 (which resolved #122): the first real CI compile of the
merged FFP stack surfaced three blocking problems.

1. presswerk-document failed to compile: writer.rs still used the
   printpdf 0.8 ops `SetFontSizeBuiltinFont` / `WriteTextBuiltinFont`,
   removed upstream when printpdf was bumped to 0.9.1 (#20, May 2026).
   The breakage was latent for months because presswerk-core failed to
   compile first; fixing core in #125/#127 unmasked it. Migrate to the
   1:1 PDF operators `Op::SetFont` (Tf) / `Op::ShowText` (Tj) with
   `PdfFontHandle::Builtin`, the replacement documented in printpdf 0.9.

2. clippy `manual_map` (deny-warnings) in the FFP legacy→v1 bridge in
   presswerk-core/src/provenance.rs — rewrite the
   `else if let Some(p) = &legacy.producer { Some(...) } else { None }`
   chain as `legacy.producer.as_ref().map(...)` per clippy's suggestion.
   Preserves the E0382 fix (borrow + clone, no moves).

3. CI plumbing:
   - rust-ci.yml: drop the fmt job added by #126 and restore the
     wrapper-only form; its non-empty actions.lock section caused
     startup_failure (0 jobs) on every run since. Auto-formatting stays
     covered by the standalone fmt.yml workflow, which works.
   - actions.lock: reconcile drifted pins so workflow refs and the
     lockfile agree — swatinem/rust-cache canonical lowercase key in
     fmt.yml; github/codeql-action v4.38.0 → v4.38.2 (workflow was
     bumped by dependabot in #121 without a relock, killing CodeQL at
     startup); haskell-actions/setup v2.12.0 → v2.12.1 (casket-pages
     drift). rust-ci.yml section restored to [] per estate convention
     for reusable-call wrappers (cf. governance.yml).

Note: the Governance "Actions lockfile verify" failure predates this
work (failing on every main push since mid-September); this fixes the
drifts that are identifiable without the gh-actions-lock tool.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 7 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 310d8c77-f973-469b-9438-dca57c116a34
📥 Commits

Reviewing files that changed from the base of the PR and between f8e745d and a0d952e.

⛔ Files ignored due to path filters (1)
  • .github/workflows/actions.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • .github/workflows/rust-ci.yml
  • crates/presswerk-core/src/provenance.rs
  • crates/presswerk-document/src/pdf/writer.rs
  • crates/presswerk-document/src/provenance.rs
  • crates/presswerk-security/src/audit.rs
  • Autopilot · 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.

❤️ Share

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

@hyperpolymath
hyperpolymath force-pushed the arena/01a108e5-presswerk branch from 470235f to b7394b1 Compare October 4, 2026 22:34
CI (b5d21ca) advanced past presswerk-document and surfaced the next
blocking layer; this fixes it.

- presswerk-security/audit.rs `AuditLog::count`: rusqlite 0.39 has no
  `FromSql` impl for `u64` (SQLite integers are signed i64), so
  `row.get(0)` into `Result<u64,_>` failed E0277. Read as `i64` and
  widen to `u64` (COUNT(*) is never negative).

- presswerk-document/provenance.rs: two clippy `collapsible_if` sites
  (deny-warnings) in the FFP detector — collapse nested `if let` chains
  into edition-2024 let-chains (`if let Ok(catalog) && let Ok(meta_obj)`,
  and the /Ch array-walk triple `if let ... && let ... && is_meaningful`).

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@hyperpolymath
hyperpolymath force-pushed the arena/01a108e5-presswerk branch from 7f233c9 to a0d952e Compare October 4, 2026 22:36
@hyperpolymath
hyperpolymath merged commit f176201 into main Oct 5, 2026
39 of 41 checks passed
@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown

Autopilot could not be updated. Open Coding to check access and billing.

@hyperpolymath
hyperpolymath deleted the arena/01a108e5-presswerk branch October 5, 2026 03:19
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.

feat(ffp): classify and record machine-filled form provenance in the print path (D189)

1 participant