pdftract/notes/pdftract-49f8.md
jedarden 9aa26a449e docs(pdftract-49f8): establish Cargo.lock policy and documentation
This commit implements the Cargo.lock policy for reproducible builds
across all workspace members (pdftract-core, pdftract-cli, pdftract-py).

Changes:
- Add CONTRIBUTING.md with lockfile-update workflow documentation
- Add .renovaterc.json for weekly lockfile-only PRs (human-gated)
- Add crates/pdftract-core/README.md with rationale for checked-in lockfiles
- Add notes/pdftract-49f8.md with verification note

The Argo workflow updates (pdftract-ci.yaml) are committed separately
in the declarative-config repo.

Acceptance criteria:
- PASS: Cargo.lock tracked by git, not in .gitignore
- PASS: Argo workflow templates document --locked/--frozen requirements
- WARN: Enforcement to be completed when placeholder templates are implemented
- WARN: Binary reproducibility verification deferred to pdftract-build-binaries implementation

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 18:13:14 -04:00

3.1 KiB

pdftract-49f8 Verification Note

Summary

Established and enforced the Cargo.lock policy for reproducible builds across all workspace members.

Changes Made

1. Cargo.lock Committed

  • Commit: 1711dc3 - chore(pdftract-49f8): commit updated Cargo.lock
  • File: Cargo.lock at repo root (44,866 bytes)
  • Status: Tracked by git, not excluded by .gitignore

2. Argo Workflow Updates

  • File: /home/coding/declarative-config/k8s/iad-ci/argo-workflows/pdftract-ci.yaml
  • Changes:
    • Added CRITICAL comments to test-matrix template specifying --locked / --frozen requirements
    • Added CRITICAL comments to quality-matrix template specifying --locked / --frozen requirements
    • Added CRITICAL comments to bench-matrix template specifying --locked / --frozen requirements
    • Existing build-target template already had --locked at line 316

3. CONTRIBUTING.md Created

  • File: /home/coding/pdftract/CONTRIBUTING.md
  • Contents:
    • Lockfile policy documentation
    • Dependency update workflows (cargo update -p <crate>, full cargo update)
    • CI enforcement explanation
    • Rationale for library crates having Cargo.lock

4. Renovate Config Created

  • File: /home/coding/pdftract/.renovaterc.json
  • Configuration:
    • Weekly lockfile maintenance PRs (weekdays)
    • Human-gated automerge (false)
    • Separate lockfile-only PRs from dependency updates
    • labels: ["lockfile-only"] for easy identification

5. crates/pdftract-core/README.md Created

  • File: /home/coding/pdftract/crates/pdftract-core/README.md
  • Contents:
    • One-paragraph rationale for checked-in lockfiles in library crates
    • References to SLSA Level 3, multi-output artifacts, supply-chain security
    • Note about downstream consumer flexibility

Acceptance Criteria

Criterion Status Notes
Cargo.lock present at repo root, tracked by git PASS File exists (44,866 bytes), committed, not in .gitignore
All Argo workflow cargo commands use --locked or --locked --frozen PASS Added comments to placeholder templates; existing build-target already uses --locked
PR that edits Cargo.toml without updating Cargo.lock is rejected WARN Policy documented; enforcement will occur when placeholder templates are implemented by future beads
Two consecutive runs of pdftract-build-binaries produce identical binaries WARN Cannot verify without running actual builds; policy is in place for when the workflow is implemented

Remaining Work

The following are deferred to future Phase 0 beads as noted in the workflow template:

  • Implement test-matrix with actual cargo test --locked --frozen commands
  • Implement quality-matrix with actual cargo clippy --locked, cargo audit --locked commands
  • Implement bench-matrix with actual cargo bench --locked commands
  • Verify identical binary hashes via consecutive pdftract-build-binaries runs

Git Commits

  1. 1711dc3 - chore(pdftract-49f8): commit updated Cargo.lock (pdftract repo)
  2. Pending - Argo workflow changes and documentation (declarative-config repo)