test(seal): prove the xml-sec fork on Italy and France - #319
Open
LKSNDRTMLKV wants to merge 10 commits into
Open
LKSNDRTMLKV wants to merge 10 commits into
LKSNDRTMLKV wants to merge 10 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #302. Stacked on #316; retarget as that merges.
just checkis green (1132/1132).What the fork is for, now demonstrated
The published
xml-seccaps XML node-sets at 65 536 entries. A real list over that ceiling now verifies ina_list_over_the_unpatched_ceiling_verifies_with_the_fork, confirmed by removing the[patch.crates-io]stanza and watching it fail withThe documents are deliberately not committed. They are ~5 MB of XML; they live under
tests/fixtures/local/(git-ignored) with a README saying how to fetch them, and the test skips loudly when they are absent so a checkout without them reads as "not demonstrated here" rather than as a pass.That is acceptable because the regression guard does not depend on them.
the_patched_xml_sec_is_the_one_that_resolvedreads the resolved source out ofCargo.lockand runs everywhere. It catches the failure that actually bites:[patch.crates-io]applies only while the fork's version satisfies the requirement, and bumping past it — what someone will do the day upstream publishes — makes Cargo emit an unused patch warning, not an error and fall through to the registry crate.Editing
Cargo.lockdoes not reproduce that, which is the first thing anyone will try: Cargo reconciles the lock against the manifest before building and rewrites the edit away. The assertion was confirmed by inverting it instead."Only Italy and France" was already false
#302 records a measurement from 2026-09-11. Re-measured across every list the LOTL points at on 2026-09-15:
Four lists need the fork, not two — Czechia and Spain have crossed since. Byte size does not predict the count, so this is a measurement rather than a rule, and it grows.
Germany does not verify at all, on a different ceiling the fork never touched:
XML nodes exceeds policy maximum 100000: got 100001. One node over. Upstreamstructured-world/xml-sec#158is about the node-set constant and would not close it. Filed separately.The test therefore demonstrates the mechanism rather than enumerating the members, and says so.
The fetch cap contradicted the fork
#302 asked that the 1 MiB cap be re-checked "rather than assumed to cover them". It did not cover them, by a wide margin —
fetch_trusted_listrefused every document over 1 MiB, so the fork's purpose was unreachable through this crate's own fetch path. Nothing noticed: the chain tests read fixtures and never call the fetcher, and the cap was asserted nowhere.The first fix for this was also wrong and is worth recording. I set it to 4 MiB from the fixtures I happened to have committed — which is the original mistake with a different sample, one commit after describing that mistake. Germany is 5.11 MiB.
It is now 8 MiB, sized against the whole measured set, and the invariant is a compile-time assertion beside the constant rather than a test:
A relationship between two constants should not produce a binary when violated. Confirmed by setting the cap back to 1 MiB and watching the build fail with the message.
LARGEST_PUBLISHED_LIST_BYTESis a dated measurement, and its comment says so: nothing here can re-derive it without fetching thirty documents from thirty Member States.One thing that looks alarming and is not
Committing a signed XML document changes its bytes —
.gitattributesnormalises line endings, and Italy arrives with CRLF. It still verifies, checked rather than reasoned about: the fixture was deleted, restored from the index, and re-verified. XML parsing normalises end-of-line before canonicalisation, so the signature never sees the difference.That mattered while the documents were committed. It no longer applies to them, but it applies to the LOTL fixture beside them, which has been LF since it was added.