Skip to content

feat(documents): ship container document extraction by default (M007, M008) - #21

Merged
dbowm91 merged 3 commits into
mainfrom
m008-documents-default-qualification
Nov 28, 2026
Merged

dbowm91 merged 3 commits into
mainfrom
m008-documents-default-qualification

Conversation

@dbowm91

@dbowm91 dbowm91 commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Two milestones in one change set.

M007 — container-document extraction fidelity and bounds (corrective). Nine defects found by a post-closure audit of M004/M006 are fixed, each with a fixture that fails at the baseline:

Defect Fix
XML character and entity references dropped Event::GeneralRef handling; adjacent text and reference runs merge into one token
Plain <!DOCTYPE html> refused Accepted unless the body carries [, SYSTEM or PUBLIC; no entity resolution
r:id and id collide Attributes keyed by qualified name with a local-name fallback
XLSX <dimension> treated as content Declaration no longer read; observed cells decide
Token cap bound before the cell cap The sheet scan streams events, so the cell bound is the only bound on a sheet
CSV cell count after the row was built Incremental refusal at the cap: peak RSS 70,582,272 → 20,201,472 B (16.83× → 4.82×) on a 4 MiB delimiter-dense body
Truncation inferred from the last part Per-part truncated on RawPart
document_unsupported as upstream_failed Now capability_unavailable; the other four document_* codes are unchanged
Ceilings documented as defaults Ceilings and defaults documented separately

renderer_version goes 5 → 6, with a case proving a version-5 derived entry is not served. No new FetchErrorKind, tool, argument, wire string or dependency.

M008 — container-document default enablement (capability). documents joins the default feature set, so the one published binary per target and the shipped wheel carry container extraction. [fetch].documents_enabled remains the operator switch and still refuses with document_disabled.

Changes

  • Cargo.toml: default = ["pdf", "browser", "documents"]; egress stays non-default.
  • bindings/python/Cargo.toml mirrors the feature list, and bindings/python/Cargo.lock was regenerated by resolving against the committed lock rather than cargo generate-lockfile: 378 → 390 packages (adds zip 9.8.1, calamine 0.38.0 and their closure) with no unrelated version changes.
  • Makefile: new parity-check target running the documents suite with defaults disabled, wired into check so the feature-off half cannot become green by absence.
  • tests/static_guards.rs: the default-set guard now requires documents, still rejects egress, and asserts default_documents_enabled stays feature-derived.
  • Documentation and plans, including the closure records for both milestones.

No production source line changed to enable the feature: config_validation (105 cases) and mcp_tools (32 cases) pass unmodified, which was the plan's canary.

Evidence

Gate Result
make check exit 0, 6,699 cases across 101 suites, including the new parity lane
Hosted Python native qualification, run 46115248218 41/41 jobs; wheel and sdist built --locked, installed and tested on five platforms across CPython 3.11–3.15
Eggpack candidate qualification, run 46117453196 25/25 jobs; all seven lanes built and finalized, source_revision cd075fc, outcome: complete

Wheel cost is +2.20–2.73% per target and +0.34% on the sdist, consistent with the +2.34% measured on the host binary with only the feature set changed.

Per-target release assets

Target v0.4.4 Candidate Delta
aarch64-apple-darwin 17,960,304 29,368,752 +11,408,448 (+63.5%)
aarch64-pc-windows-msvc 21,655,040 35,251,712 +13,596,672 (+62.8%)
aarch64-unknown-linux-gnu 18,524,080 29,984,432 +11,460,352 (+61.9%)
armv7-unknown-linux-gnueabihf 17,710,392 29,356,628 +11,646,236 (+65.8%)
x86_64-apple-darwin 19,779,368 32,369,512 +12,590,144 (+63.7%)
x86_64-pc-windows-msvc 25,869,312 42,128,384 +16,259,072 (+62.9%)
x86_64-unknown-linux-gnu 21,457,240 34,714,936 +13,257,696 (+61.8%)

Size review — please read before merging

All seven assets exceed ADR-0024 §5's 20 MB review figure, where three did at v0.4.4. This change set accounts for about +0.69 MB (+2.3%) of that; the remaining ~60% predates it. The attribution is measured, not assumed: a documents-off build of this source is 29,370,512 B, within 1,760 B of the producer's documents-on 29,368,752 B.

The cause of the pre-existing growth is not identified and would need a bisect between v0.4.4 and this candidate. The maintainer decision of 2026-11-28 is to keep the default feature set and send v0.4.5 to size review with that written reason, rather than taking ADR-0027 alternative 1. If the review rejects the growth, alternative 1 — revert the default and keep the capability optional — remains the documented recovery.

Closure records

  • M007: plans/closure/web-acquisition-expansion/007-status.md
  • M008: plans/closure/web-acquisition-expansion/008-status.md

@dbowm91
dbowm91 merged commit 4ae443d into main Nov 28, 2026
55 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.

1 participant