pdftract/crates/pdftract-core/src/parser
jedarden f76f3a647b test(pdftract-5tmcg): add cycle detection test for page tree flattener
Add test_cycle_detection_in_page_tree to verify that circular references
in the /Pages tree are detected and handled gracefully without panicking.
The test creates a page tree with a cycle (parent -> child1 -> child2 -> child1)
and verifies that the flattener returns the valid pages while pruning the
cyclic portion.

Acceptance criteria verified:
- 3-level /Pages inheritance with MediaBox: PASS
- EC-09 missing MediaBox defaults to US Letter: PASS
- /Pages tree with cycles detected: PASS
- /Rotate value 45 clamped to 0: PASS
- Page count validation: PASS
- proptest random shapes never panic: PASS
- INV-8 no panics on invalid input: PASS

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Bead-Id: pdftract-5tmcg
Bead-Id: pdftract-4iier
2026-05-18 00:38:44 -04:00
..
lexer feat(pdftract-4hn1): use Cow<'static, str> for diagnostic messages 2026-05-17 23:23:38 -04:00
object feat(pdftract-7nav): add PdfStream helper methods and consolidate stream types 2026-05-17 23:55:47 -04:00
catalog.rs fix(pdftract-2bsfc): fix stream tests and catalog parser error handling 2026-05-17 23:56:10 -04:00
diagnostic.rs feat(pdftract-2bsfc): implement document catalog parser with PageLabels number tree 2026-05-17 23:45:45 -04:00
mod.rs feat(pdftract-7nav): add PdfStream helper methods and consolidate stream types 2026-05-17 23:55:47 -04:00
pages.rs test(pdftract-5tmcg): add cycle detection test for page tree flattener 2026-05-18 00:38:44 -04:00
stream.rs feat(pdftract-3nnqy): implement StreamDecoder trait, filter pipeline, and bomb limit 2026-05-18 00:34:28 -04:00
xref.rs fix(pdftract-1yad): enable proptest tests and update verification note 2026-05-18 00:15:00 -04:00