Skip to content

Budget binding collections and enable shared growth checks (#677) - #698

Merged
yhay81 merged 28 commits into
mainfrom
codex/677-binding-collection-budgets
Nov 5, 2026
Merged

yhay81 merged 28 commits into
mainfrom
codex/677-binding-collection-budgets

Conversation

@yhay81

@yhay81 yhay81 commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Closes #677.

The Python binding previously bypassed the shared collection lint. Cached character columns, Type 3 lookup results, nested savepoints, tagged Python values, and signature-field worklists could grow without charging the operation's memory budget. This change enables the shared lint and charges those allocations before growth; refusal raises LimitError with code memory_size and failed edits remain recoverable.

Existing fixed keys, fixed geometry/schema sizes, pixel caps, budgeted reservations, and bounded copies state their bounds with focused lint expectations. Commits separate the audited modules; the character-column constructor and its two text-binding callers are kept together. The TIFF palette copy is fallible. The separate public limit for encoded Pixmap input is tracked in #697.

Acceptance:

  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings passes with the binding included.
  • Remaining expectations name fixed bounds, existing checks, or charged reservations; the exemption file and test allowlist are removed.
  • Python regressions cover cached columns, empty-font Type 3 lookups, both nested-transaction paths, total nesting across fresh budgets, tagged arrays, signature worklists, and recovery after refusal.
  • Before/after timings, script, raw output, and audit notes are committed under evidence/binding-collection-budgets/.

Validation: locked extension build, Ruff, formatting, ty, workspace Clippy, and workspace Rust tests passed. The full Python suite passed 7,243 tests with 692 skipped; the targeted regression run passed 131 tests with 1 skipped. All six current-head CI checks passed: Rust, Python 3.11, Python 3.15, Python 3.15t, Audit, and Windows save. There are no unresolved review threads. No owner decision or release gate applies.

yhay81 added 28 commits November 6, 2026 01:28
@yhay81
yhay81 merged commit 2c5ae21 into main Nov 5, 2026
6 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.

Check that pyropdf-python grows input-derived collections through the budget

1 participant