imprimatur 0.8.0-aarch64-linux-gnu → 0.8.1-aarch64-linux-gnu

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff2e6c40da9caaccdae6a868e999760b25592bbaf3ae9fc20c42b7c927bc4bdd
4
- data.tar.gz: 5700e3769fa8b7b52e8b888d60967428d8cf326dff66a351fc4c50db0a787b45
3
+ metadata.gz: 8e45880f6944a007234ce99fb196f9421b0c6ff4d852b3a2db4d9920033db620
4
+ data.tar.gz: 6cb5da186f0be53df0b38e2e8cf637c8c6f3bd4a0f2c8a71129a9b9e738e491f
5
5
  SHA512:
6
- metadata.gz: 13950df455e35784adad7e89feee880e5fefd5bbd86790283c8794d28520adb50c78eaa2c36afcf035b6d9a5ac912adc7d97ff7b71f1c0535f37b69eed115e0a
7
- data.tar.gz: 841c3b93f3866f6a01f174c221bf1a832bc6f6ba9b1da582b8e3723b08c9cc47d2225c213c42ec221e1642ca5d1ad4bd382a14961b87795bb2521f6d219368e0
6
+ metadata.gz: 4b38abf70340c6fb1c707aca033d30318460199e7f14b2f2af97a61b86ef6e79c59f86dd6df666bac2c9b3c226d43cb7fe379c76c2c515b2e618ccc390a6f224
7
+ data.tar.gz: cd17aace372ea781e79aef328a0e542e4e8c4c4a0b71fa4fc4d5d19a2bcf319b186beb9cc9bd2f540fae87b4b5a9d850dac9360b4ab165e51cd722a4985f4cf9
data/CHANGELOG.md CHANGED
@@ -11,6 +11,14 @@
11
11
  - Allow a bounded exit grace when macOS cannot inspect an exiting worker;
12
12
  persistent monitor failures still terminate and reap a live worker.
13
13
 
14
+ ## [0.8.1](https://github.com/seuros/imprimatur/compare/v0.8.0...v0.8.1) (2026-10-29)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **pdf:** recover timeout neighbours within the overall deadline ([#16](https://github.com/seuros/imprimatur/issues/16)) ([e86fbbf](https://github.com/seuros/imprimatur/commit/e86fbbfef85f2c645090c43359c0744962e951a1))
20
+ * **pdf:** step timeout recovery so a Ruby wakeup cannot restart it ([75c3894](https://github.com/seuros/imprimatur/commit/75c3894c8a791c5ef4af562dc99de4e745770ad3))
21
+
14
22
  ## [0.8.0](https://github.com/seuros/imprimatur/compare/v0.7.0...v0.8.0) (2026-10-27)
15
23
 
16
24
 
data/README.md CHANGED
@@ -384,6 +384,28 @@ after metadata was read preserves completed pages and explicitly marks the
384
384
  unreached pages; an expired overall deadline marks them `skipped`. Cancellation
385
385
  still raises rather than returning a partial successful call.
386
386
 
387
+ For timeout-neighbour recovery, opt in to a shorter worker-attempt budget:
388
+
389
+ ```ruby
390
+ Imprimatur.pdf_pages(bytes, timeout: 300, batch_timeout: 60)
391
+ ```
392
+
393
+ Here `timeout:` is the **overall** deadline, including recovery; `batch_timeout:`
394
+ caps the initial worker and each singleton retry. Completed pages survive a
395
+ batch timeout. Unread later neighbours are tried once before the first missing
396
+ page (which may have stalled the worker). Recovery is best effort, never an
397
+ extension of the overall deadline. Output-limit skips are not retried, and all
398
+ attempts share `max_output_bytes:`. Input, depth, process-memory and per-page
399
+ limits still apply; `max_inflated:` remains per worker/recovery attempt, not a
400
+ cumulative decompression allowance.
401
+
402
+ With `batch_timeout:` enabled, an explicit finite `timeout:` replaces the
403
+ ordinary 60-second process ceiling for this call; `timeout: nil` retains that
404
+ 60-second ceiling. Both budgets must be positive; zero overall time still fails
405
+ immediately. Omitting `batch_timeout:` preserves the existing behaviour. Rust
406
+ callers can use `pages_isolated_recovering` with an explicit attempt duration
407
+ and overall `Limits`/`ProcessLimits`.
408
+
387
409
  This is resource containment, **not a filesystem/network security sandbox**.
388
410
  The raw crate `info`, `pages` and `render_page` APIs remain in-process;
389
411
  `render_page` cannot interrupt Hayro.
@@ -11,8 +11,9 @@ module Imprimatur
11
11
 
12
12
  def self.pages(document, first_page: 1, last_page: 0xFFFFFFFF, max_pages: 500,
13
13
  max_page_bytes: 256 * 1024, max_output_bytes: 8 * 1024 * 1024,
14
- memory_bytes: 1024 * 1024 * 1024, max_bytes: nil, **limits)
15
- options = [first_page, last_page, max_pages, max_page_bytes, max_output_bytes]
14
+ memory_bytes: 1024 * 1024 * 1024, max_bytes: nil, batch_timeout: nil, **limits)
15
+ options = [first_page, last_page, max_pages, max_page_bytes, max_output_bytes,
16
+ batch_timeout && Float(batch_timeout)]
16
17
  JSON.parse(Native.pdf_pages(Reader.read(document, max_bytes), Reader.limits(max_bytes:, **limits),
17
18
  options, RENDER_WORKER, memory_bytes),
18
19
  symbolize_names: true)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Imprimatur
4
- VERSION = '0.8.0'
4
+ VERSION = '0.8.1'
5
5
  end
data/lib/imprimatur.rb CHANGED
@@ -115,6 +115,8 @@ module Imprimatur
115
115
  # image count (nil when unknown), truncation flag and failure reason.
116
116
  # Takes +first_page:+, +last_page:+, +max_pages:+ (500),
117
117
  # +max_page_bytes:+ (256 KiB), +max_output_bytes:+ (8 MiB), and read limits.
118
+ # Optional +batch_timeout:+ caps each worker attempt; +timeout:+ then bounds
119
+ # the whole call, including one-pass recovery of timeout-unread neighbours.
118
120
  # @return [Hash] +page_count:+, +encrypted:+ and +pages:+
119
121
  def pdf_pages(document, ...) = PdfReader.pages(document, ...)
120
122
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imprimatur
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: aarch64-linux-gnu
6
6
  authors:
7
7
  - Abdelkader Boudih