Skip to content

Reuse analysis across receipt worker batches - #1071

Merged
chubes4 merged 1 commit into
trunkfrom
fix/1044-batch-page-compilation
Aug 23, 2026
Merged

Reuse analysis across receipt worker batches#1071
chubes4 merged 1 commit into
trunkfrom
fix/1044-batch-page-compilation

Conversation

@chubes4

@chubes4 chubes4 commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add compilePreparedPages() to compile independent page plans with one bounded worker-local analysis cache
  • preserve compilePreparedPage() as the single-plan entrypoint
  • report per-receipt transform counts rather than cumulative worker counts
  • exercise interrupted 50-page resume through two worker batches
  • verify batch receipts equal independently compiled receipts apart from elapsed-time metrics

Corpus evidence

On 58 persisted plans from the 203 MB corpus:

  • eight isolated workers: approximately 1,500s wall and 10,970.45 aggregate worker-seconds
  • four batched workers: 1,362.47s wall and 4,842.03 aggregate receipt-seconds
  • aggregate CPU reduction: 55.9%
  • slowest batch: 1,362.47s
  • exact-version isolated/batched control receipt: byte-for-byte equal after removing compile_duration_ms

The API still returns one independently digest-bound receipt per page; batching changes worker-local analysis reuse, not terminal composition or persistence boundaries.

Addresses #1044.

Testing

  • composer validate --strict
  • composer test
  • 280 parity fixtures
  • WordPress and staged compilation contracts
  • clean package-install proof
  • 3-page exact receipt equality
  • 50-page arbitrary-order resume and whole-result equality

AI assistance

OpenAI GPT-5.6 Sol via OpenCode assisted with corpus benchmarking, API design, implementation, and compatibility verification. Chris Huber reviewed and is responsible for the changes.

@chubes4
chubes4 merged commit 1f685da into trunk Aug 23, 2026
4 checks passed
@chubes4
chubes4 deleted the fix/1044-batch-page-compilation branch August 23, 2026 02:51
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