fix(pdf): candidates sorted by data offset, JSON depth pre-scan before parse, budget wording; chore(memory): BLK-009 mitigated with gate, EVAL-014, journal, TODO, CLAUDE.md import notes

This commit is contained in:
bchanot committed 2026-10-11 17:31:07 +02:00
1 parent 3a6e92625a
commit 62b2b9d86a
9 files changed
+188 -30

No files matched your search

+7 -3
View File
@@ -93,9 +93,13 @@ hides its `/Keywords`, so a stripped attachment on such a file reads as
The audit of 60ee712 measured +2.2 GB RSS in Chromium on a 4 MB / 4 GiB
bomb before the inflater was fed in 16 KiB slices (+215 MB after); that
measurement is manual until a browser runner exists.
- Done: the candidate CPU/byte budget on the scanner, one 16 MiB budget of
examined content shared by every candidate, a monotonic `endstream` search
bounded to the cap, and no JSON parse for a candidate not opening on `{`.
- Done: the candidate CPU/byte budget on the scanner: one 16 MiB budget of
retained and parsed content shared by every candidate (a cancelled
inflation is not charged, so up to 32 oversized streams may each cost one
capped inflation of CPU, bounded, no memory retained), a monotonic
`endstream` search over candidates sorted by data offset and bounded to
the cap, and no JSON parse for a candidate not opening on `{` or nesting
brackets deeper than 64 levels (linear byte pre-scan, strings skipped).
- Option C or a server-side import (Step 14) with a hard memory and time
budget per file, for any path that still parses PDF objects.
- Dependency decision on pdf-lib (unmaintained since 2021): keep it for