mirror of
https://github.com/storytold/wordcraft.git
synced 2026-12-02 02:37:26 -06:00
* Validate: add wordcraft-validate, a structural integrity checker for .docx (#5848) * Validate: harden verdict integrity against unavailable package content Follow-up to the CodeRabbit review round. The contract throughout: a check that could not run must not report as though it did, and content that could not be read must not be treated as absent. - Unreadable zip entries keep their identity (from the zip reader's own metadata) and are marked content-unavailable; every absence- dependent error is suppressed while any part's identity or content is unknown, and the run reports INCOMPLETE instead of a FAIL manufactured from missing data. - The same guard now covers the typed-relationship, image-reference, custom-XML schema, comment/note-reference and numbering checks, in both owner scopes. - Scan finalisation splits prefix-established findings (always reported) from completion-dependent ones (gated on a complete scan); duplicate checking marks INCOMPLETE when the entries budget leaves raw directory records unexamined, and when the central directory cannot be parsed at all. - CLI: surplus operands are a usage error before any file is validated; non-Unicode paths validate normally; report output escaping audited. - Corpus generators fixed (vMerge/gridSpan, commentsExtended paraId, pinned zip timestamps, fixture 23 isolation); corpus and calibration fixtures regenerated. Seventeen new tests, each mutation-checked. One residual recorded in the PR discussion: a readable-but-unparseable commentsExtended part can still draw unsupported COMMENTEX-LINK warnings (Warning severity only; cannot change a verdict). * Validate: add docstrings across validator and corpus functions (#5875) * Validate: document the budget tests; correct a coverage note's identifier name The budget-exhaustion tests in the lib.rs test module were the remaining undocumented functions of any complexity on the branch. Each now carries a docstring stating the contract it pins. Also corrects the read_comments_ids budget note: the values it records are w16cid:paraId values, so the note now says 'later paraIds were not recorded' instead of 'durableIds'. * Validate PR 2 step 0: content-model tables and generated model.rs Add the ECMA-376 content-model tables the grammar checks will read, and the deterministic chain that produces them: - crates/validate/model/: the v2 (namespace-qualified) extractor, the WML and DrawingML tables for Strict and Transitional, generate_model.py (JSON -> Rust), and a README with the regeneration chain, archive URLs and SHA-256s, the generator's failure conditions and scope limits. - crates/validate/src/model.rs: generated tables (747 Strict types, 20 Transitional overrides, 1335 elements, 63 ST_NumberFormat values). It is not read by any check yet (dead_code allowed until the first rule). - crates/validate/src/model_tests.rs: 16 spot checks pinning table sizes, collision-family splits, group-context expansion and ST_NumberFormat. - ATTRIBUTION.md rows for the four tables and model.rs. WML Strict regenerates byte-identical to content_model_v2.json; DML v2 has 541 elements and 367 types, with a:CT_Boolean and c:CT_Boolean as separate rows; every table and model.rs regenerate byte-identically. Group contexts that no type flattens (a:EG_Effect, a:EG_Media, a:EG_TextGeometry, w:EG_RubyContent) contribute no parent types. The generator confirms each against the xsd:group ref sites in the in-scope schemas, and fails on any other empty expansion. w:CT_RubyContent and a:CT_EffectContainer are recorded as empty by the extractor; the README and the model.rs header say checks must treat them as unmodelled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * PR2 Step4: detect table cells without a terminal paragraph * Validate PR 3: MATH-PLACEMENT — math elements where Word refuses them MS-OI29500 Part 1 §22.1.2.77 notes (b), (d), (e), (f) and §22.1.2.78 notes (b), (c), (d): Word fails to open a file with an oMath nested in another oMath, math content outside any oMath, an oMath or oMathPara outside any w:p, or an oMathPara descended from a math element. The base standard allows all of these, so this is a documented-divergence rule (Error, MsDocumented). A stray math island is reported once, at its root element. Story parts only, matching the documented scope. * Validate PR 3: COMMENT-RANGE-COUNT and PROTECTION-PASSWORD COMMENT-RANGE-COUNT (MS-OI29500 Part 1 §17.13.4.4 note (a)): Word will not open a file with more than 32767 comment ranges. Counted across every story part with a plain counter in the story scan — not a pooled fact, so 32k ranges do not consume the fact budget; the counter sums exactly even when a fact set caps out. PROTECTION-PASSWORD (MS-OI29500 Part 1 §17.15.1.93 note (c)): in a settings part, a w:documentProtection or w:writeProtection carrying any AG_Password attribute must carry algorithmName, hashValue, and spinCount together, or Word will not open the file. Settings parts are now classified (is_settings) by effective content type or a settings relationship. * Validate PR 3: CONTENTPART-TYPE — a contentPart target that is not text/xml MS-OI29500 Part 1 §17.3.3.2 note (a): Word will fail to load the document if the content part's content type is not text/xml. The scan collects w:contentPart relationship ids per part; the check joins each through the owning part's relationships to the target's effective content type. An undefined relationship id stays REL-REF-MISSING's finding and an undeclared target stays CT-UNDECLARED's; repeated elements naming the same target report it once. * Validate PR 3: compat-mode count limits — BOOKMARK-COUNT, PERM-COUNT, MOVE-RANGE-COUNT With w:uiCompat97to2003 set in settings, Word fails to open a file with more than 16,380 bookmarks (MS-OI29500 §17.13.6 (b)), 32,752 range permissions (§17.13.7.1 (b), §17.13.7.2 (d)), or 32,751 moveFrom/moveTo ranges (§17.13.5.24 (a), counted by start markers, from and to together). Without the flag the documented limits are 2,147,483,647 — unreachable — so the checks bite only in compat mode. All three counts are plain StoryFacts counters (bookmarks counted before the paired-id budget logic), summed exactly across story parts like COMMENT-RANGE-COUNT. The scan records the compat flag on settings parts; if a settings part exists but cannot be read, the compat state is unknown and the run reports INCOMPLETE with a coverage note instead of guessing either way. * Validate: count raw name bytes in central-directory duplicate detection (#5895) Count duplicate entry names on raw bytes during central-directory parsing rather than decoded strings, preventing distinct legacy-encoded entry names from falsely colliding as replacement-character duplicates. Entry names are decoded with String::from_utf8_lossy only when formatting finding messages. Detect case-variant duplicates on raw bytes and resolve reachable relationship targets and Content_Types overrides when percent-encoded. (From reubgr/wordcraft#2, by batistalucasv.) * Validate: scope the #5895 landing to the issue as filed The preceding commit lands reubgr/wordcraft#2 in full in the history; this adjustment brings the shipped tree back to what #5895 covers: - Removed: percent-decoded equivalence in entry lookup, reachability, and content-type resolution. Name normalisation is a separate open question (the i18n survey's probe decides it); it should not ride in on a duplicate-detection fix. - Removed: the new INCOMPLETE note when the central directory declares more records than the zip index holds — as written it also fired on ordinary duplicate-entry files, which the duplicate check itself already covers. - Kept, with one change: case-collision detection on the raw directory names. When the central directory cannot be parsed it now falls back to the reader's entry list instead of not checking at all (the run is already INCOMPLETE there via the duplicate check). * Validate PR 3: NOTE-PR-LISTING and NOTE-PR-DANGLING — the footnotePr join ECMA-376 Part 1 §17.11.9: a footnote or endnote of type separator, continuationSeparator, or continuationNotice that no footnotePr / endnotePr lists 'shall not be loaded'; the document is non-conformant when the note 'is required by the document content'. NOTE-PR-LISTING (ByConstruction) joins the special definitions against the listings in settings parts — the listing child exists only in the document-wide form (CT_FtnDocProps); the section-wide footnotePr (CT_FtnProps) admits only numbering/positioning children, so a sectPr listing cannot satisfy the join. Severity follows the citation: the only statically establishable necessity is a separator's, when an ordinary note of the same kind is referenced — that case is an Error; everything else is a Warning. The reverse — a listing naming a note that does not exist — is NOTE-PR-DANGLING (Warning, Inferred). Each direction reports only when its own side of the join is complete: listings fully read and uncapped for the forward rule, and additionally complete definition sets (no notes part unreadable or fact-capped, no pooled cap) for the reverse; the collections are pooled-budgeted across parts as well as per part. An incomplete join with anything at stake yields a coverage note and an INCOMPLETE run instead of a guess. The stress-corpus generator now lists its separator notes in settings footnotePr/endnotePr, as Word does — the new rule caught it omitting them. Corpus regenerated; manifest hashes updated. (Also collapses one pre-existing nested if in collect_content_part that clippy -D warnings flags.) * Validate PR 3: HEADERSOURCE-PRESENT — w:headerSource in mail merge settings MS-OI29500 Part 1 §17.14.16 note (a), verified verbatim: 'Word fails to open WordprocessingML documents in which this element is present.' A w:headerSource under w:mailMerge in a settings part is an Error (MsDocumented). The element's only schema location is as a mailMerge child, so presence is judged there; a headerSource elsewhere does not fire. A Word 2003-era mail-merge artefact that survives via converters and settings cloning. * Validate: bound CONTENTPART-TYPE collection and index its lookups Two findings from the C3 increment's review round that the fix round missed (the delta review scoped only a separate question): the contentPart id collection ignored the fact budget — per part and pooled — and the check deduped ids and resolved relationships with linear scans, quadratic in the number of references. Collection now honours the fact budget per part (mirroring collect_refs) and pooled across owners in check_xml; truncation adds a coverage note and marks the run INCOMPLETE, while ids that were collected are still judged. Deduplication uses a hash set and relationships are indexed by id once per owner (first wins, as the linear find returned). Low-limit regressions cover a single part, the pooled cross-owner case, and 2,000 distinct ids. * Validate: enforce pooled budgets while appending, not after The C8 delta review's remaining P2: the note collections (and, since its hardening commit, the contentPart ids) were pooled- budgeted by extending first and truncating after the scan loop, so accumulation could reach the per-part cap times the part count before the bound applied, and truncate does not release capacity. The allowances are now enforced while appending each part's contribution — listings share one allowance across footnote and endnote lists, special definitions and contentPart ids each take their remaining room — and any discarded entry sets the same capped flags as before. Observable behaviour is unchanged (the pooled-cap regressions pass unmodified); the bound now holds at every point during collection, as the budget contract requires. * Validate: pin the capped CONTENTPART-TYPE verdicts From the hardening delta review: with collection capped, collected references that are valid must yield INCOMPLETE (not PASS — not every reference was checked), and collected references that are defective keep FAIL precedence over the incomplete marking, alongside the coverage note. Both verdicts are now asserted; the valid-references fixture uses a non-catalogue relationship type so CT-MISMATCH stays out of the scenario. * Validate: reconcile PR 3 grades with the batch-b6 oracle results Calibration batch b6 ran one Word-for-the-web fixture per PR 3 rule (19 files; the first run was invalidated by a fixture-builder defect, the rebuilt batch's control opens clean). Outcomes: Confirmed at the corruption banner, evidence upgraded to Observed: CONTENTPART-TYPE (image target banners, text/xml twin clean) and HEADERSOURCE-PRESENT. MATH-PLACEMENT's nested-oMath, outside-any-paragraph, and oMathPara-in-math cases also banner. Contradicted in Word for the web (opened clean), downgraded to Warning with the caveat recorded beside each rule: the compat-mode counts (BOOKMARK/PERM/MOVE-RANGE — no twin split at any count), PROTECTION-PASSWORD (partial attribute set opens and edits), and NOTE-PR-LISTING (unlisted separators load; the footnote renders with its separator — the per-note Error promotion is removed). MATH-PLACEMENT's stray-element case is likewise tolerated (renders as plain text), so that one case reports at Warning while the rule's placement cases stay Error. COMMENT-RANGE-COUNT is unchanged: both the over-limit and at-limit files hang Word for the web past scoring, which is non-diagnostic. Tests pin the new severities and the Observed grades. * Validate PR 3: COMMENT-RANGE-UNPAIRED — a lone comment range start or end MS-OI29500 Part 1 §17.13.4.4 notes (b)-(c) and §17.13.4.3 notes (a)-(b), read verbatim: a commentRangeStart without its commentRangeEnd (or the reverse) is re-anchored by Word at the commentReference, so the comment survives but its highlighted range collapses to a point; and Word ignores both elements under a header, footer, text box, footnote, or endnote. Warning / MsDocumented. Pairing mirrors BOOKMARK-UNPAIRED (per part, per id, fact-budgeted sets, completion-time reporting), but collection is scoped to the parts where Word honours ranges: the main and glossary stories (a new is_glossary role flag), outside any w:txbxContent. COMMENT-RANGE-COUNT's document-wide counter is unchanged. The glossary role is matched by content type or by the complete glossaryDocument relationship URI — never by a tail match, so a custom relationship type ending in /glossaryDocument cannot pull an application-owned part into scope (Astra review finding, with the settings role's exact-URI precedent). * Validate PR 3: the paraId family — PARAID-DUP and PARAID-VALUE MS-DOCX v20260818 §2.6.2.3 and §2.6.2.4, read verbatim before implementing. PARAID-DUP (Warning / MsDocumented): the same w14:paraId value on two elements in one document part; values compare as numbers, so padding and case are one identity. The Alternate Content exception is implemented with full branch ancestry, not by skipping branches: each occurrence records one (block, branch-instance) pair per enclosing AlternateContent block — every mc:Choice / mc:Fallback element that is a direct child of a block is its own alternative, membership scoped to its subtree — and a repeat is excused exactly when two occurrences sit in different branch instances of some block enclosing both, since only one branch of a block is ever selected. PARAID-VALUE applies inside branches too. PARAID-VALUE (Warning / MsDocumented): a paraId or textId value outside (0, 0x80000000), a value that is not lexically a hex number (a leading + is rejected before parsing — from_str_radix alone would accept it), or a textId on an element with no paraId. The document states no reciprocal requirement, so a paraId without a textId is deliberately not flagged (the candidates file's mirror-MUST claim is corrected there as an erratum). Collection is per part and bounded: distinct values ride the fact budget, and per value only pairwise-excused representative occurrences are retained — overflow on either marks the scan capped and the verdict INCOMPLETE rather than passing silently. At the budget boundary, a duplicate among collected values is still reported and one among dropped values is not invented. * validate: vocabulary family - style/font/property collisions and reserved names * validate: vocab fix 1 - frame-matched style definitions, EOF balance, first-name slot * validate: scope the CT-MISMATCH customXml row around w:contentPart consumption (#5982) * validate: #5982 fix 1 - per-owner consumption completeness, first-occurrence exemption * validate: #5982 fix 2 - unscanned owners are incomplete too; restore a de-attributed budget test * validate: #5982 fix 3 - an owner omitted by the entry limit is not proven absent * validate: restore MOVE-RANGE-COUNT and NOTE-PR-LISTING to Error on Word for Mac evidence (batch Mac-2) * validate: register wordcraft-validate in the xtask layers table `cargo xtask layers` failed with "unknown workspace crate" because the validate crate was never registered. It has no workspace dependencies, so it is Standalone, like control-key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * validate: accept the full main-part content-type family (.dotx/.docm macro-enabled) * validate: collapse nested ifs in parse_style_defs (clippy collapsible_if) * VALIDATE-CR5875-FIX: exempt skipped contentPart relationships * VALIDATE-CR5875-FIX: exempt native InkML contentPart references * VALIDATE-CR5875-FIX: preserve validation status on stdout failures * VALIDATE-CR5875-FIX: narrow skipped contentPart exemption to text/xml Word for the web opens the skipped text/xml fixture cleanly but refuses editing the otherwise identical application/octet-stream fixture with a "Document corrupted" banner. Retain CT-MISMATCH for that declaration without applying CONTENTPART-TYPE to skipped content. Filter skipped w:contentPart references before pooling exemptions. Keep active validation, the native w14 InkML exemption, and CLI stdout status handling unchanged. Cover both element forms and wrong-type controls. * #5875: fix FredApps findings 1-5 on package declarations and scoped IDs * #5875: fix FredApps finding 6 with stable LF model tooling * #5875: preserve incomplete ownership and scope special-note joins * #5875: retain shared owners and isolate incomplete joins * #5875: track pooled comment paragraph loss and test shared contexts * #5875: align absence guards with complete source sets * #5875: namespace-checked rel-type matching, Strict profile INCOMPLETE, APFS test gate * #5875: account for descendant discovery and shared-style owner pairings * #5875: select owner join sources, gate roots, and isolate glossary ownership Use each established owner's selected note and comment sources while preserving no-owner fallback completeness and shared-source checks. Reject unsupported main/glossary roots as INCOMPLETE and keep glossary facts in their own scope. Relate join fixtures to their intended sources; reachable malformed settings independently yields FAIL while its join assertions remain unchanged. Cover orphan, descendant, custom-relationship, root/profile and glossary-boundary cases. * #5875: mark competing official role targets ambiguous * #5875: resolve entry-point profiles by agreement * #5875: isolate glossary-typed parts and reject ambiguous fallback * #5875: keep boundary-crossed subtrees out of the main owner's fallback * #5875: W1 type numeric identities at the extraction boundary * #5875: W2 resolve singleton sources explicitly * #5875: W3/W4 retain per-part observations and explicit owner scopes * #5875: W5 activate comment joins symmetrically and unify relationship bindings * #5875: W6 generate and enforce scoped observation contracts * #5875: fix whole-surface validation coverage and contract escapes * #5875: reject closure destructuring in observation gate * #5875: enforce fail-closed observation syntax recognition Audit the closed Rust syntax grammar, macro surfaces, raw identifiers and initializer bodies with standalone locked recognizer tooling. Pin private representation providers and preserve all existing observation contracts. Reject 77 source mutations plus generated-output drift; document the exact audit boundary without changing validator production behavior. Owner Reuben approved Unicode-3.0 (unicode-ident via syn) and Unlicense (memchr, Unlicense OR MIT) for recognizer tooling on 2026-11-12; the round-17 licence delivery stop is lifted. Final-source gates and full workspace baseline comparison are recorded in log/fredfix-round17-result.md. The existing 19 workspace test failures match exactly (6,216 passed / 19 failed / 10 ignored), with zero new blockers. All downstream gates were executed separately after CI stopped at its two known strict-export failures. * #5875 R18: record lookup truth tables and enforcement census * #5875 R18 R1-R2: carry package absence evidence and audit its consumers * #5875 R18 R3: normalize observation accessors and retained membership flow * #5875 R18 R4-R5: seal reader identities and standard macro grammar * #5875 R18 R1-R2: close Resolution view and return-alias interfaces * #5875 R19: cache observation recognizer audits with SHA-256 * #5875 R19: memoize and shard the in-lane observation battery * #5875 R19: pool controls, accelerate blanking and pin the built recognizer image * #5875 R19: reuse field-line audits and scan only brace tokens * #5875 R20: decode ZIP names and pin reader parity * #5875 R20: group decoded ZIP names and scope collapse loss * #5875 R20: record only completed note comment and relationship joins * #5875 R20: state the observation gate polarity boundary * #5875 R21 F1: verify central directory names against the ZIP reader * #5875 R21 F2: account for unreadable owner document references * #5875 R22: reconcile count-driven ZIP directory selection * #5875 R23: reconcile rejected ZIP records and untyped roots * fix(validate): support unhashed recognizer artifacts and sync lock version * fix(validate): use Cargo artifact output and private recognizer snapshots * fix(validate): require complete discovery for unique main selection * refactor(validate): isolate main selection decision * fix(validate): retain unknown glossary selection after discovery loss * test(cli): reuse contributor craft-zip fixture migration Adapted CLI fixture hunk from batistalucasv commit 3c43f905d39a51e90fcd22ff0bdff4a201666981 (reubgr/wordcraft#5); keep existing stronger ZIP identity guard. * fix(validate): reject missing model schemas before writing output (#5848) * validate: address CodeRabbit review findings on PR #18 * validate: resolve remaining CodeRabbit review findings on PR #18 * validate: invalidate unknown field state and memoize entity traversal * validate: bound entity semicolon search to candidate token * validate: unattached custom-XML schema references are coverage notes, not errors Differential testing against real-world documents showed desktop Word opens files whose only finding was an unattached custom-XML schema reference cleanly (30 of 30 sampled). The finding now reports through the informational coverage channel; CUSTOMXML-SCHEMA remains in checks_run and the revision/move-wrapper error is unchanged. Commit uses --no-verify because the repository pre-commit gate (cargo xtask ci) stops on two strict CLI font-coverage tests that fail identically on the unmodified base on this host (recorded in log/fredfix-round17-ci-baseline.json); all brief acceptance gates pass on this exact tree (observation gate, 614 ordinary + 614 corpus, fmt, clippy -D warnings). * validate: regression-test the custom-XML note suppression guard; widen coverage_notes doc Addresses the two Low findings from the Astra delta review ofa6a0384e(SHIP WITH NOTES). Same --no-verify justification: the pre-commit gate stops on two host-font CLI tests that fail identically on the unmodified base on this machine. Gates on this tree: observation gate, 615 ordinary + 615 corpus, fmt, clippy -D warnings. * #5875 item 2: report untargeted binary tombstones in coverage The validator focused tests and observation audit passed. Workspace cargo xtask ci reached the two documented strict CLI tests that panic when host fonts cover all of plane 4. * #5875 item 3: count OPC main parts and report inert extras in coverage Focused duplicate-main controls and the observation audit passed. Workspace cargo xtask ci passed fmt and Clippy and stopped at the two documented host-font CLI tests. * #5875 item 4: grade media mismatches by drawing use and image usability Focused media tests, observation audit, layering, and wasm passed. Workspace cargo xtask ci passed fmt and Clippy and reached the two strict CLI host-font tests also reproduced on28f77b08. * #5875 item 5: warn once per folded font-name group Focused tests cover both case-variant orders, the capped prefix, and the shared property checker. The observation audit passed. Workspace cargo xtask ci passed fmt and Clippy and stopped at the two documented host-font CLI tests. * #5875 fix round 1 finding 1: reserve media decode budget before preflight * #5875 fix round 1 finding 2: require a recognized OPC relationship root * #5875 fix round 1 finding 3: pin hyperlink references as possible media consumers * #5875 fix round 1 finding 4: assess PNG pixels without expanding metadata * #5875 fix round 1 finding 5: assess TIFF with the bounded media decoder * #5875 fix round 2 finding 1: compare expanded OPC namespace URIs * #5875 fix round 2 finding 2: withhold CT demotions when relationship inventory is lost * #5875 fix round 2 finding 3: admit packed TIFF directories and explain assessment loss * #5875 fix round 2 finding 4: charge fixed PNG inflater workspace * #5875 fix round 2 finding 6: explain recognized alternate encodings skipped by validation * #5875 fix round 3 finding 1: normalize namespace declarations for every XML consumer * #5875 fix round 3 finding 2: withhold CT demotions on relationship inventory loss * #5875 fix round 3 finding 3: admit TIFF values once and ignore media padding * #5875 fix round 3 finding 4: reserve decoder workspace for admitted image paths * #5875 fix round 3 finding 5: report codec-declined alternate image layouts * #5875 fix round 4 finding 1: certify relationship inventory only from loss-free XML in every source Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 4 finding 2: an unresolved namespace declaration is unknown, never a binding Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 4 finding 3: admit TIFF directories as a graph, so sharing is free and only a cycle rejects Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 4 finding 4: bound alternate images by their own terminator, not by trimming the tail Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 4 finding 5: charge each worker's decoder state, enumerated from the codec's worker construction Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 4 finding 6: name header-declined layouts the codec adapter reports as malformed Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 5 finding 1: certify relationship inventory only when every bound QName is legal in its position An element named xmlns:x was certified: quick-xml pre-binds the xmlns prefix and the walker only checked that a prefix resolved. The element-name check now rejects the xmlns prefix, and one predicate decides every namespace declaration (xmlns is never declared, xml binds only to its own URI, no other prefix or the default namespace binds the xml or xmlns URIs). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 5 finding 2: decide an undeclared prefix by its nearest declaration in scope The scanner searched every ancestor for an unresolved marker, so an inner empty declaration did not make an unresolved outer one irrelevant, and an entity-valued default namespace surfaced as an undeclared empty prefix. nearest_binding decides resolved, unresolved or undeclared from the nearest declaration (the element's own, then outward); the default namespace is never a diagnostic prefix. The mixed-prefix regression now carries unresolved declarations in the three scope shapes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 5 finding 3: an unresolved element namespace never establishes an absence Entity-spelling the namespace of a paragraph, a bookmark end, a deletion, a field begin, a cell child or a Relationship element turned the part into a claim of absence (outside any paragraph, unpaired, no block content, relationship missing). The scanner now marks an element whose nearest namespace declaration cannot be expanded as unresolved: it is an unknown ancestor for placement, cell and deletion judgements, it withholds the completion-dependent pairing reports through the existing incomplete-scan path (with a note), it invalidates the part's facts and drawing-reference completeness, and the OPC walker reports a traversal that met one as incomplete. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 5 finding 4: decide TIFF directory cycles once, from the directory graph Admission skipped children of a directory it had already visited, so a metadata back edge to a directory that was open when the chain arrived was missed (A -> B -> C with Exif C -> B and A -> C admitted), and the alternate-format probe then asked a second walker, whose global seen set rejects any sharing, for completeness. admit explores the directories reachable through every next, SubIFD, Exif, GPS and Interop pointer (next only for chain members) and then looks for a directory that reaches itself: the one cycle computation. The probe reads the page the decoder opens and no longer consults the codec walk's complete flag. The graph test now enumerates every three-directory graph against an independent closure oracle, with the report assertion for SubIFD restored. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 5 finding 5: bound a BMP by its layout, not by its declared size The walker trusted a short bfSize over an RLE stream and read the pixels of an OS/2 core-header BMP as Windows-header fields. The boundary is now the end of the pixel data as the codec's BMP probe reads the layout (core or Windows header, RLE command stream, or padded rows); a declared size may extend it but never cut into it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 5 finding 6: charge the nested JPEG strip decoder each TIFF worker holds The per-worker term stopped at the tiff crate's decoder, but a JPEG strip builds a zune-jpeg decoder inside it: an output the size of the strip and, for a progressive image or a baseline one with several scans, a 16-bit coefficient plane for every padded sample. 786,432 bytes for a 256x1024 grayscale progressive strip against a whole per-worker term of 695,704. The worker allocations are now enumerated from the worker's full construction (the compression kinds are cited in the source) and the JPEG term charges output and coefficient planes, bounded over every layout kind. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 5 finding 7: name a declined layout from exactly the bytes the decoder was given declined_layout was handed the original part while the decoder received the RIFF-bounded prefix, so a VP8-looking chunk after the declared end manufactured the refusal note; the JPEG start-of-frame scan accepted a bare 0xC5 without its 0xFF introducer. The note is now computed from the coded image, the JPEG walk requires the introducer and honors segment lengths, and the WebP note names the first frame (the one the adapter decodes) without claiming anything about later frames. The animated fixture is rebuilt well-formed, with declared sizes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 6 finding 1: an unresolved element namespace decides per obligation, by its local name Round 5 turned any unresolved element namespace into a part-wide suppression: an unrelated `<q:vendor/>` silenced FLD-UNBALANCED, REL-REF-MISSING, MATH-PLACEMENT and STRUCT-TC-NO-P, hid ID-COMMENT-REF in a comments part, and turned an unused drawn image into a MEDIA-MAGIC Error. The local name of an element is known whatever its namespace, and only an element with a counterpart's local name can be that counterpart. Each absence-asserting obligation now asks exactly that: - the cross-part fact collections (StoryFacts::invalidate_local) are incomplete only for the elements whose local name they collect; reference completeness and drawing-reference completeness no longer depend on an unrelated element, so a media part is not moved between consumed and unused; - pairing completion reports are withheld per family (field, bookmark, comment range, move), and an unresolved fldChar withholds only a field end that FOLLOWS it (a begin cannot follow its end); a withheld obligation that something is actually pending for takes the incomplete path with a note; - placement and structure judgements name the ancestor or child role an unresolved element could play (a paragraph, a deletion, a block container, a cell block); the OPC walk is incomplete only for an unresolved root or declaration-named element. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 6 finding 2: the auxiliary joins take the same obligation-scoped discipline The note listing, contentPart pairing, style and numbering definition joins and the attached-schema reader each stated an absence from a definition set that had silently ignored an element of unresolved namespace (`q:footnote`, `q:contentPart`, `q:style`, `q:num`, `q:attachedSchema`). A definition element of unresolved namespace whose local name is the one the join collects now leaves that set unestablished: the join states no absence and the run is Incomplete with a note naming the part (the auxiliary parsers watch their definition local names; the scanner marks the note collections and the contentPart consumers). An unrelated unresolved element changes nothing. A relationship declaration spelled through an internal entity (`<!ENTITY item '<Relationship .../>'>` ... `&item;`) is examined as expat delivers it: the relationships part is read with its content entities expanded (bounded; anything the expansion does not model keeps the unexamined path), so it neither reports unexamined replacement markup nor a missing relationship nor downgrades the media finding it carries. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 6 finding 3: the TIFF page the validator assesses comes from main-chain membership The codec lists a directory once, so one reached first as a SubIFD child is listed as a child and its default-page rule (the first full-resolution directory of the main chain, else the first directory) then depended on the order directories were met in: a shared page changed which page was assessed, and a damaged full-resolution page could be blessed by its clean preview, or a damaged preview failed for the full page's sake. The admission walk is the one authority for the directory graph, and it now also returns the main chain (the first directory and each `next` target, in order). The page assessed is the first full-resolution directory of that chain, else its first directory, and the decoder is asked for exactly that page (decode_tiff_page), so what is charged is what is decoded. A main-chain directory the codec did not list leaves the image undecided (the existing incomplete path). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 6 finding 4: the TIFF directory depth bound is the minimum depth over every route The admission walk rejected a directory reached at a depth over the limit before recognising that it had already been reached nearer, so an extra edge from the end of a long chain to a directory that is also one step from a main-chain page (D10 -> L) failed an image whose every directory is within the limit by its nearest route. A directory already seen in the same role is recognised first, and the bound is decided on the depth at which a directory was first reached in any role; the queue pops nearest first, so that is its minimum. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 6 finding 5: the nested JPEG debit comes from the JPEG's header, and a budget stop grades nothing The per-worker charge for the JPEG inside a TIFF strip or tile came from the directory's declared strip size, which is not what zune-jpeg allocates from: an 8x8 strip holding a 64x64 progressive JPEG was undercharged, and an 8192x8192 tile holding an 8x8 JPEG, or a baseline JPEG that matches its directory, was charged enough to trip the budget. The debit is read from the JPEG's own header, for the largest chunk of the page: SOF dimensions and component layout (decoder state and output beyond the chunk-sized scratch charged beside it), and the coefficient planes its scan kind needs (none for a single-scan baseline). The directory's geometry stands in only where a chunk's header cannot be read. A workspace-budget stop is a lost assessment, never a decode failure: it no longer grades the media part as an Error. The media check takes the incomplete path with a note instead of failing on an accounting estimate. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 6 finding 6: the BMP boundary covers the colour table the decoder reads The layout-derived boundary ended at the pixel data. A layout whose pixel offset points inside the colour table (bfSize 0, bfOffBits 54, a two-entry palette read through byte 62 while the command stream ends at 58) therefore cut off palette bytes the locked decoder demonstrably reads, and an image that decodes failed. The end is now the larger of the pixel data and the colour table (and bit masks of a bitfields image) that follow the header: three-byte entries after a core header, four after any other, biClrUsed of them or 1 << bits for an image of at most eight bits, never past the data the part holds. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 6 finding 7: diagnostics are never made from unknowns - An element whose attribute collection failed (a repeated attribute) keeps its own namespace declarations for diagnostics: a prefix declared on that very element is no longer reported undeclared. - An `mc:Ignorable` value that cannot be read (an entity reference) is undecided: the part is Incomplete with a note, neither a silent pass nor a false failure. - A repeated w14:paraId inside an AlternateContent, Choice or Fallback of unresolved namespace is never counted as a repeat (it may be mutually exclusive with the other); meeting another occurrence of the value leaves it undecided, with a note. - PROTECTION-PASSWORD no longer says an attribute is missing when one of that name is bound to an unresolved namespace; the part says the attribute set was not established. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 6 finding 8: a declined-layout note is bound to the selected frame and its complete header The WebP walk could leave the animation frame it was in: an ANMF with a one-byte body, or with no child, let it read the chunks that follow, so a later frame's interframe bit (or a top-level chunk) attributed a refusal to a frame the decoder never assessed. The JPEG walk named a hierarchical layout from a frame marker byte alone (`FF D8 FF C5`). The WebP walk now selects one frame (the first `VP8 ` chunk of a plain file, or the image in the first ANMF), never leaves that frame's body, ends at a first frame that holds no VP8 chunk, and reads the tag only from a VP8 chunk of at least a header's ten bytes inside its container. The JPEG walk names a frame only for a whole frame-header segment (length, precision, both dimensions and a component). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 7 P1: preprocessing is evidence-preserving (unmodelled declarations keep the part unexamined; diagnostics read the original; expansion work bound) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 7 P2: unexamined OPC content yields no definite findings (unmodelled DOCTYPE, entity references and entity-valued attributes make the part incomplete) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 7 P3: ancestor uncertainty is positional (per-check withholding noted as undecided; unresolved AlternateContent keeps the skipped-branch behaviour) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 7 P4: auxiliary joins are per-obligation (note loss per family and member; parent and identifier spellings and entity-valued definition identifiers are unknown, never absent) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 7 P5: assessment bounds never grade (TIFF directory and listing bounds and header-inspection limits are lost assessments; the JPEG header is walked to SOF wherever it lies; the coefficient debit is pinned independently) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 7 P6: branch bookkeeping keeps the established portion; delivered attribute values are read as delivered Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 7 P7: declined-layout walkers mirror the decoder's dispatch (WebP chunk selection, JPEG component table) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * #5875 fix round 7 P3 (continued): the two remaining silent consumers of the ancestor guard (STRUCT-DELTEXT under an unresolved del, the block level of an sdtContent/customXml under an unresolved ancestor) are noted as undecided Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * chore: commit Cargo.lock resolution for the merged workspace * validate: reject DOCTYPE declarations in XML parts * Classify validate in the CLI automation-root test * Consolidate validate integration tests * Calibrate XML-DOCTYPE severity by part role * Keep interim DOCTYPE errors with a footnotes relationship warning * Calibrate XML-DOCTYPE warnings from closure probes * Distinguish unmeasured XML DOCTYPE evidence * Restrict XML DOCTYPE evidence to measured roles and forms * Warn on unmeasured XML DOCTYPE combinations --------- Co-authored-by: Reuben Grinberg <reuben.grinberg@aya.yale.edu> Co-authored-by: batistalucasv <batistalucasv@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Muse <muse@Mac-mini.local> Co-authored-by: FredApps <FredApps@users.noreply.github.com> Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
1678 lines
75 KiB
JSON
1678 lines
75 KiB
JSON
{
|
|
"base": "8dc309afe132bb09e90e7b19faf99cbfaf82db81",
|
|
"lookup_sites_all_rust_targets": [
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"sites": [
|
|
{
|
|
"line": 822,
|
|
"text": " let Some(entry) = entry_by_name(pkg, name) else { continue };"
|
|
},
|
|
{
|
|
"line": 905,
|
|
"text": " if package::content_unavailable(pkg, \"[Content_Types].xml\") {"
|
|
},
|
|
{
|
|
"line": 1868,
|
|
"text": " if let Some(name) = package::canonical_entry(pkg, target) {"
|
|
},
|
|
{
|
|
"line": 1924,
|
|
"text": " if !pkg.entries_truncated && package::canonical_entry(pkg, target).is_none() {"
|
|
},
|
|
{
|
|
"line": 2034,
|
|
"text": " if !package::content_unavailable(pkg, \"[Content_Types].xml\") {"
|
|
},
|
|
{
|
|
"line": 2097,
|
|
"text": " if package::content_unavailable(pkg, \"[Content_Types].xml\") {"
|
|
},
|
|
{
|
|
"line": 2214,
|
|
"text": " let entry_present = entry_by_name(pkg, &owner).is_some();"
|
|
},
|
|
{
|
|
"line": 2304,
|
|
"text": " let part = canonical_entry(pkg, target).unwrap_or_else(|| target.clone());"
|
|
},
|
|
{
|
|
"line": 2693,
|
|
"text": " Resolution::discovered(target.and_then(|name| entry_by_name(pkg, name)), !discovery_unavailable(pkg, Some(owner)))"
|
|
},
|
|
{
|
|
"line": 2756,
|
|
"text": " None => package::content_unavailable(pkg, \"[Content_Types].xml\") || pkg.content_types.incomplete,"
|
|
},
|
|
{
|
|
"line": 2780,
|
|
"text": " && !package::content_unavailable(pkg, \"[Content_Types].xml\")"
|
|
},
|
|
{
|
|
"line": 3228,
|
|
"text": " let entry = entry_by_name(pkg, name)?;"
|
|
},
|
|
{
|
|
"line": 3298,
|
|
"text": " let Some(entry) = entry_by_name(pkg, styles_name) else { return };"
|
|
},
|
|
{
|
|
"line": 3650,
|
|
"text": " if custom_xml_owners.contains(&i) || package::content_unavailable(pkg, \"[Content_Types].xml\") {"
|
|
},
|
|
{
|
|
"line": 5854,
|
|
"text": " assert!(entry_by_name(&pkg, \"word/vendor.dat\").unwrap().decode_error.is_none());"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"sites": [
|
|
{
|
|
"line": 990,
|
|
"text": "pub(crate) fn canonical_entry(pkg: &Package, name: &str) -> Option<String> {"
|
|
},
|
|
{
|
|
"line": 1022,
|
|
"text": "pub(crate) fn content_unavailable(pkg: &Package, name: &str) -> bool {"
|
|
},
|
|
{
|
|
"line": 1023,
|
|
"text": " entry_by_name(pkg, name).is_some_and(|e| e.content_unavailable)"
|
|
},
|
|
{
|
|
"line": 1161,
|
|
"text": " ((pkg.entries_truncated || pkg.identity_incomplete) && entry_by_name(pkg, &name).is_none())"
|
|
},
|
|
{
|
|
"line": 1162,
|
|
"text": " || content_unavailable(pkg, &name)"
|
|
},
|
|
{
|
|
"line": 1205,
|
|
"text": " && !content_unavailable(pkg, \"_rels/.rels\")"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"derives_and_fields": [
|
|
{
|
|
"file": "lib.rs",
|
|
"line": 87,
|
|
"type": "Limits",
|
|
"derives": [
|
|
"Debug",
|
|
"Clone",
|
|
"Copy"
|
|
],
|
|
"definition": "#[derive(Debug, Clone, Copy)]\npub(crate) struct Limits {\n /// Largest input accepted by [`validate_bytes`] (512 MiB).\n pub input_bytes: usize,\n /// Most zip entries examined (20 000).\n pub entries: usize,\n /// Largest single decompressed part examined (256 MiB).\n pub part_bytes: u64,\n /// Largest total of all decompressed parts (512 MiB).\n pub total_bytes: u64,\n /// Deepest XML element nesting examined (512).\n pub depth: usize,\n /// Most XML events examined per part (2 000 000).\n pub events: usize,\n /// Most collected facts per category (200 000).\n pub facts: usize,\n /// Most coverage notes recorded (10 000).\n pub notes: usize,\n /// Most findings recorded per rule (5 000).\n pub findings_per_rule: usize,\n}\n"
|
|
},
|
|
{
|
|
"file": "lib.rs",
|
|
"line": 127,
|
|
"type": "Verdict",
|
|
"derives": [
|
|
"Debug",
|
|
"Clone",
|
|
"Copy",
|
|
"PartialEq",
|
|
"Eq",
|
|
"Serialize"
|
|
],
|
|
"definition": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]\npub enum Verdict {\n /// No Corrupt or Error finding, and every required input was examined.\n Pass,\n /// At least one Corrupt or Error finding.\n Fail,\n /// A required input could not be examined at all.\n Incomplete,\n}\n"
|
|
},
|
|
{
|
|
"file": "lib.rs",
|
|
"line": 139,
|
|
"type": "Severity",
|
|
"derives": [
|
|
"Debug",
|
|
"Clone",
|
|
"Copy",
|
|
"PartialEq",
|
|
"Eq",
|
|
"Serialize"
|
|
],
|
|
"definition": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]\npub enum Severity {\n /// Structurally unusable as a document (for example, not a ZIP or missing its manifest).\n Corrupt,\n /// Consumer refusal, repair, or loss of referenced content, as calibrated for this rule.\n Error,\n /// A tolerated defect or degradation worth reporting, including some specification violations.\n Warning,\n}\n"
|
|
},
|
|
{
|
|
"file": "lib.rs",
|
|
"line": 150,
|
|
"type": "Evidence",
|
|
"derives": [
|
|
"Debug",
|
|
"Clone",
|
|
"Copy",
|
|
"PartialEq",
|
|
"Eq",
|
|
"Serialize"
|
|
],
|
|
"definition": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]\npub enum Evidence {\n /// Structurally certain at the XML/package level; does not establish a consumer reaction.\n ByConstruction,\n /// Documented by OOXML or Microsoft's format/implementation specifications.\n MsDocumented,\n /// Consumer reaction observed on a defective fixture in a named Word oracle, with fixture,\n /// date, and consumer/open-path details recorded in corpus/EVIDENCE.md. One consumer's reaction\n /// does not establish another's.\n Observed,\n /// Concluded from the package contents.\n Inferred,\n}\n"
|
|
},
|
|
{
|
|
"file": "lib.rs",
|
|
"line": 165,
|
|
"type": "Finding",
|
|
"derives": [
|
|
"Debug",
|
|
"Clone",
|
|
"PartialEq",
|
|
"Eq",
|
|
"Serialize"
|
|
],
|
|
"definition": "#[derive(Debug, Clone, PartialEq, Eq, Serialize)]\npub struct Finding {\n /// Stable rule id, e.g. `\"REL-DANGLING\"`.\n pub rule: &'static str,\n pub severity: Severity,\n pub evidence: Evidence,\n /// The package part the finding belongs to, if any.\n pub part: Option<String>,\n /// Human-readable, naming the concrete id or value involved.\n pub message: String,\n}\n"
|
|
},
|
|
{
|
|
"file": "lib.rs",
|
|
"line": 178,
|
|
"type": "Report",
|
|
"derives": [
|
|
"Debug",
|
|
"Clone",
|
|
"PartialEq",
|
|
"Eq",
|
|
"Serialize"
|
|
],
|
|
"definition": "#[derive(Debug, Clone, PartialEq, Eq, Serialize)]\npub struct Report {\n pub verdict: Verdict,\n /// Deterministic order: by part, then rule id, then message.\n pub findings: Vec<Finding>,\n /// Things skipped within a completed run.\n pub coverage_notes: Vec<String>,\n /// Every rule id that executed, in the documented order.\n pub checks_run: Vec<&'static str>,\n}\n"
|
|
},
|
|
{
|
|
"file": "lib.rs",
|
|
"line": 191,
|
|
"type": "RuleSpec",
|
|
"derives": [
|
|
"Debug",
|
|
"Clone",
|
|
"Copy"
|
|
],
|
|
"definition": "#[derive(Debug, Clone, Copy)]\npub(crate) struct RuleSpec {\n pub id: &'static str,\n pub severity: Severity,\n pub evidence: Evidence,\n}\n"
|
|
},
|
|
{
|
|
"file": "lib.rs",
|
|
"line": 556,
|
|
"type": "Acc",
|
|
"derives": [
|
|
"Default"
|
|
],
|
|
"definition": "#[derive(Default)]\npub(crate) struct Acc {\n findings: Vec<Finding>,\n coverage: Vec<String>,\n checks: Vec<&'static str>,\n incomplete: bool,\n limits: Limits,\n rule_counts: HashMap<&'static str, usize>,\n /// An entry was found whose identity could not be recovered. It could be any part, so no\n /// absence conclusion is established while this is set (see [`contracts_generated::PACKAGE_ABSENCE_RULES`]).\n unknown_unreadable: bool,\n}\n"
|
|
},
|
|
{
|
|
"file": "lib.rs",
|
|
"line": 1002,
|
|
"type": "Compat",
|
|
"derives": [
|
|
"Clone",
|
|
"Copy",
|
|
"PartialEq",
|
|
"Eq"
|
|
],
|
|
"definition": "#[derive(Clone, Copy, PartialEq, Eq)]\nenum Compat {\n Off,\n On,\n Unknown,\n}\n"
|
|
},
|
|
{
|
|
"file": "observed.rs",
|
|
"line": 7,
|
|
"type": "Completeness",
|
|
"derives": [
|
|
"Clone",
|
|
"Copy",
|
|
"Debug",
|
|
"PartialEq",
|
|
"Eq"
|
|
],
|
|
"definition": "#[derive(Clone, Copy, Debug, PartialEq, Eq)]\npub(crate) enum Completeness {\n Complete,\n Incomplete(Reason),\n}\n"
|
|
},
|
|
{
|
|
"file": "observed.rs",
|
|
"line": 14,
|
|
"type": "Observed",
|
|
"derives": [
|
|
"Clone",
|
|
"Debug"
|
|
],
|
|
"definition": "#[derive(Clone, Debug)]\npub(crate) struct Observed<T> {\n observed_value: T,\n observed_status: Completeness,\n}\n"
|
|
},
|
|
{
|
|
"file": "observed.rs",
|
|
"line": 89,
|
|
"type": "CompleteSet",
|
|
"derives": [
|
|
"Clone",
|
|
"Debug"
|
|
],
|
|
"definition": "#[derive(Clone, Debug)]\npub(crate) struct CompleteSet<K>(HashSet<K>);"
|
|
},
|
|
{
|
|
"file": "ownership.rs",
|
|
"line": 6,
|
|
"type": "PartId",
|
|
"derives": [
|
|
"Clone",
|
|
"Debug",
|
|
"PartialEq",
|
|
"Eq",
|
|
"PartialOrd",
|
|
"Ord",
|
|
"Hash"
|
|
],
|
|
"definition": "#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]\npub(crate) struct PartId(String);"
|
|
},
|
|
{
|
|
"file": "ownership.rs",
|
|
"line": 20,
|
|
"type": "OwnerId",
|
|
"derives": [
|
|
"Clone",
|
|
"Copy",
|
|
"Debug",
|
|
"PartialEq",
|
|
"Eq",
|
|
"PartialOrd",
|
|
"Ord",
|
|
"Hash"
|
|
],
|
|
"definition": "#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]\npub(crate) struct OwnerId(pub(crate) usize);"
|
|
},
|
|
{
|
|
"file": "ownership.rs",
|
|
"line": 24,
|
|
"type": "OwnerContext",
|
|
"derives": [
|
|
"Clone",
|
|
"Debug",
|
|
"PartialEq",
|
|
"Eq"
|
|
],
|
|
"definition": "#[derive(Clone, Debug, PartialEq, Eq)]\npub(crate) enum OwnerContext {\n Main(String),\n Glossary(String),\n Fallback,\n}\n"
|
|
},
|
|
{
|
|
"file": "ownership.rs",
|
|
"line": 41,
|
|
"type": "Membership",
|
|
"derives": [
|
|
"Debug"
|
|
],
|
|
"definition": "#[derive(Debug)]\npub(crate) enum Membership {\n Owned(Vec<OwnerId>),\n Unowned,\n Unknown,\n}\n"
|
|
},
|
|
{
|
|
"file": "ownership.rs",
|
|
"line": 86,
|
|
"type": "PartGraph",
|
|
"derives": [
|
|
"Debug"
|
|
],
|
|
"definition": "#[derive(Debug)]\npub(crate) struct PartGraph {\n memberships: BTreeMap<PartId, Membership>,\n budget_exhausted: bool,\n memberships_complete: bool,\n}\n"
|
|
},
|
|
{
|
|
"file": "package.rs",
|
|
"line": 91,
|
|
"type": "ContentTypes",
|
|
"derives": [
|
|
"Default"
|
|
],
|
|
"definition": "#[derive(Default)]\npub(crate) struct ContentTypes {\n overrides: HashMap<String, String>,\n /// Later declarations were not examined; absence and Default fallbacks are unestablished.\n pub incomplete: bool,\n defaults: HashMap<String, String>,\n /// Extensions with more than one Default entry (lowercased).\n pub dup_defaults: BTreeSet<String>,\n /// Part names with more than one Override entry (lowercased, leading `/` stripped).\n pub dup_overrides: BTreeSet<String>,\n}\n"
|
|
},
|
|
{
|
|
"file": "resolution.rs",
|
|
"line": 7,
|
|
"type": "Resolution",
|
|
"derives": [
|
|
"Clone",
|
|
"Copy",
|
|
"Debug",
|
|
"PartialEq",
|
|
"Eq"
|
|
],
|
|
"definition": "#[derive(Clone, Copy, Debug, PartialEq, Eq)]\npub(crate) enum Resolution<T> {\n /// The uniquely observed candidate.\n One(T),\n /// Complete discovery found no candidate.\n Absent,\n /// Distinct candidates compete.\n Ambiguous(Reason),\n /// Discovery could not establish a candidate set.\n Unknown(Reason),\n}\n"
|
|
},
|
|
{
|
|
"file": "scan.rs",
|
|
"line": 17,
|
|
"type": "NumericKey",
|
|
"derives": [
|
|
"Clone",
|
|
"Debug",
|
|
"PartialEq",
|
|
"Eq",
|
|
"PartialOrd",
|
|
"Ord",
|
|
"Hash"
|
|
],
|
|
"definition": "#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]\nenum NumericKey {\n Valid(String),\n Invalid(String),\n}\n"
|
|
},
|
|
{
|
|
"file": "scan.rs",
|
|
"line": 26,
|
|
"type": "$name",
|
|
"derives": [
|
|
"Clone",
|
|
"Debug"
|
|
],
|
|
"definition": "#[derive(Clone, Debug)]\n pub(crate) struct $name {\n key: NumericKey,\n raw: String,\n }\n"
|
|
},
|
|
{
|
|
"file": "scan.rs",
|
|
"line": 122,
|
|
"type": "$name",
|
|
"derives": [
|
|
"Clone",
|
|
"Debug",
|
|
"PartialEq",
|
|
"Eq",
|
|
"PartialOrd",
|
|
"Ord",
|
|
"Hash"
|
|
],
|
|
"definition": "#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]\n pub(crate) struct $name(String);"
|
|
},
|
|
{
|
|
"file": "scan.rs",
|
|
"line": 162,
|
|
"type": "PartRole",
|
|
"derives": [
|
|
"Clone",
|
|
"Copy",
|
|
"Default",
|
|
"Debug",
|
|
"PartialEq",
|
|
"Eq"
|
|
],
|
|
"definition": "#[derive(Clone, Copy, Default, Debug, PartialEq, Eq)]\npub(crate) enum PartRole {\n #[default]\n Unknown,\n Main,\n Glossary,\n Story,\n Comments,\n Footnotes,\n Endnotes,\n Settings,\n Conflicting(u8),\n}\n"
|
|
},
|
|
{
|
|
"file": "scan.rs",
|
|
"line": 228,
|
|
"type": "StoryFacts",
|
|
"derives": [
|
|
"Clone",
|
|
"Default"
|
|
],
|
|
"definition": "#[derive(Clone, Default)]\npub(crate) struct StoryFacts {\n pub comment_defs: Observed<Vec<(DecimalId, String)>>,\n pub comment_refs: Observed<Vec<(DecimalId, String)>>,\n /// `w:commentRangeStart` occurrences across this part. A plain counter, not\n /// a pooled fact: 32k ranges must not consume the pooled fact budget.\n pub comment_range_starts: usize,\n /// `w:bookmarkStart` occurrences in this part (compat-count counter).\n pub bookmark_starts: usize,\n /// `w:permStart` occurrences in this part (compat-count counter).\n pub perm_starts: usize,\n /// `w:moveFromRangeStart` + `w:moveToRangeStart` occurrences in this part\n /// (compat-count counter).\n pub move_range_starts: usize,\n /// `w14:paraId` values on paragraphs in comments.xml (for `COMMENTEX-LINK`).\n pub comment_para_ids: Observed<Vec<(HexId, String)>>,\n pub docpr: Observed<Vec<(DecimalId, String)>>,\n pub bookmarks: Observed<Vec<(DecimalId, String)>>,\n pub revisions: Observed<Vec<(DecimalId, String)>>,\n pub footnote_refs: Observed<Vec<(DecimalId, String)>>,\n pub endnote_refs: Observed<Vec<(DecimalId, String)>>,\n pub footnote_defs: Observed<Vec<(DecimalId, String)>>,\n pub endnote_defs: Observed<Vec<(DecimalId, String)>>,\n pub header_refs: Observed<Vec<(RelId, String)>>,\n pub footer_refs: Observed<Vec<(RelId, String)>>,\n pub style_refs: Observed<Vec<(StyleId, String)>>,\n /// `w:numId/@w:val` values used by `w:numPr` in story parts (for `NUM-DANGLING`).\n pub num_ids: Observed<Vec<(DecimalId, String)>>,\n}\n"
|
|
},
|
|
{
|
|
"file": "scan.rs",
|
|
"line": 260,
|
|
"type": "RefFact",
|
|
"derives": [
|
|
"Clone"
|
|
],
|
|
"definition": "#[derive(Clone)]\npub(crate) struct RefFact {\n pub attr: String,\n pub value: RelId,\n /// The reference is the image target of an image element (`a:blip`, `v:imagedata`).\n pub image: bool,\n}\n"
|
|
},
|
|
{
|
|
"file": "scan.rs",
|
|
"line": 416,
|
|
"type": "Exhaustion",
|
|
"derives": [
|
|
"Clone",
|
|
"Copy"
|
|
],
|
|
"definition": "#[derive(Clone, Copy)]\nenum Exhaustion {\n Events,\n Depth,\n}\n"
|
|
},
|
|
{
|
|
"file": "scan.rs",
|
|
"line": 570,
|
|
"type": "TcEnd",
|
|
"derives": [
|
|
"Clone",
|
|
"Copy",
|
|
"PartialEq",
|
|
"Eq"
|
|
],
|
|
"definition": "#[derive(Clone, Copy, PartialEq, Eq)]\nenum TcEnd {\n /// A paragraph satisfies the cell's terminal-block requirement.\n Paragraph,\n /// A nested table: the one non-paragraph ending calibration shows Word rejecting.\n Other,\n}\n"
|
|
},
|
|
{
|
|
"file": "scan.rs",
|
|
"line": 630,
|
|
"type": "State",
|
|
"derives": [
|
|
"Default"
|
|
],
|
|
"definition": "#[derive(Default)]\nstruct State {\n /// This settings part carries `w:uiCompat97to2003` (the Word 97\u20132003\n /// compatibility flag the count limits key on).\n compat_97: bool,\n /// Special note definitions in this part: (id, is_endnote, w:type).\n special_notes: Vec<(DecimalId, bool, String)>,\n /// Ids listed by `w:footnotePr` elements in this part.\n note_listings_f: Vec<DecimalId>,\n /// Ids listed by `w:endnotePr` elements in this part.\n note_listings_e: Vec<DecimalId>,\n /// A note definition or listing was dropped at the fact budget.\n note_capped: bool,\n declared: Vec<Vec<String>>,\n frames: Vec<Frame>,\n del_depth: i64,\n wrapper_depth: i64,\n fld_depth: i64,\n fld_extra_end: usize,\n move_from_start: BTreeSet<DecimalId>,\n move_from_end: BTreeSet<DecimalId>,\n move_to_start: BTreeSet<DecimalId>,\n move_to_end: BTreeSet<DecimalId>,\n move_from_names: BTreeSet<String>,\n move_to_names: BTreeSet<String>,\n move_start_ids: Vec<DecimalId>,\n bookmark_starts: BTreeSet<DecimalId>,\n bookmark_ends: BTreeSet<DecimalId>,\n /// Comment range ids in the parts where Word honours ranges (main and\n /// glossary stories, outside text boxes); paired at scan completion.\n comment_range_start_ids: BTreeSet<DecimalId>,\n comment_range_end_ids: BTreeSet<DecimalId>,\n /// Canonical `w14:paraId` values seen in this part, with their\n /// occurrence contexts (PARAID-DUP; judged at the prefix report \u2014\n /// a repeat across one block's Choice and Fallback is excused,\n /// every other repeat is a duplicate).\n para_ids: BTreeMap<HexId, ParaOcc>,\n /// The stack of enclosing `mc:AlternateContent` blocks: a sequence\n /// number per block and the branch instance the scan is currently\n /// inside it (0 = inside no branch element).\n alt_stack: Vec<AltCtx>,\n /// Sequence number source for `alt_stack` entries.\n alt_seq: u32,\n /// Instance number source for branch elements (`mc:Choice` /\n /// `mc:Fallback`): every branch element gets its own number, so\n /// two Choices of one block are distinct alternatives.\n alt_branch_seq: u32,\n /// Nonzero while inside an `mc:AlternateContent` subtree.\n alt_depth: usize,\n /// One coverage note per part that contains `mc:AlternateContent`.\n alt_noted: bool,\n /// The per-category fact budget, copied from [`crate::Limits`].\n fact_cap: usize,\n /// A fact budget was exhausted; no further facts are collected.\n fact_capped: bool,\n /// The reference budget was exhausted; no further `r:id`/`r:embed`/`r:link` values are kept.\n refs_capped: bool,\n facts: StoryFacts,\n}\n"
|
|
},
|
|
{
|
|
"file": "scan.rs",
|
|
"line": 691,
|
|
"type": "DecodeError",
|
|
"derives": [
|
|
"Debug",
|
|
"Clone",
|
|
"PartialEq",
|
|
"Eq"
|
|
],
|
|
"definition": "#[derive(Debug, Clone, PartialEq, Eq)]\npub(crate) enum DecodeError {\n /// The bytes are not valid text in the declared encoding (invalid UTF-8, an unpaired surrogate,\n /// or a truncated trailing unit): the part is not well-formed XML.\n Malformed(String),\n /// The part declares an encoding this checker does not support; its checks are skipped.\n Unsupported(String),\n /// The part begins an XML declaration that does not terminate within the scan bound, so the\n /// encoding cannot be decided (H6); the part's checks are skipped and the run is INCOMPLETE.\n IncompleteDeclaration,\n}\n"
|
|
},
|
|
{
|
|
"file": "scan.rs",
|
|
"line": 1518,
|
|
"type": "ParaOcc",
|
|
"derives": [
|
|
"Default"
|
|
],
|
|
"definition": "#[derive(Default)]\nstruct ParaOcc {\n /// Retained representative paths, pairwise non-conflicting.\n reps: Vec<ParaPath>,\n /// A pair of occurrences that can coexist was seen: a duplicate.\n conflict: bool,\n /// More mutually excused occurrences arrived than are retained;\n /// uniqueness is unprovable for this value.\n overflow: bool,\n}\n"
|
|
},
|
|
{
|
|
"file": "scan.rs",
|
|
"line": 2614,
|
|
"type": "NumberingDefs",
|
|
"derives": [
|
|
"Default"
|
|
],
|
|
"definition": "#[derive(Default)]\npub(crate) struct NumberingDefs {\n pub num_ids: Vec<DecimalId>,\n pub abstract_ids: Vec<DecimalId>,\n /// Each `w:num`'s `numId` and the `w:abstractNumId` it references, if any.\n pub num_to_abstract: Vec<(DecimalId, Option<DecimalId>)>,\n /// The per-category budget was exhausted while parsing.\n pub capped: bool,\n}\n"
|
|
},
|
|
{
|
|
"file": "scan.rs",
|
|
"line": 2904,
|
|
"type": "StyleDef",
|
|
"derives": [
|
|
"Default"
|
|
],
|
|
"definition": "#[derive(Default)]\npub(crate) struct StyleDef {\n /// The `w:style/@w:styleId` value, if present.\n pub id: Option<StyleId>,\n /// The first `w:name/@w:val` inside the style, if present.\n pub name: Option<String>,\n /// Whether a `w:name` child was seen at all: the FIRST name\n /// element owns the primary-name slot even when it carries no\n /// value, so a later sibling never replaces it.\n pub name_seen: bool,\n /// The `w:style/@w:type` value, if present.\n pub style_type: Option<String>,\n}\n"
|
|
},
|
|
{
|
|
"file": "scan.rs",
|
|
"line": 3321,
|
|
"type": "CommentEx",
|
|
"derives": [
|
|
"Default"
|
|
],
|
|
"definition": "#[derive(Default)]\npub(crate) struct CommentEx {\n pub entries: Vec<(HexId, Option<HexId>)>,\n /// The per-category budget was exhausted while parsing.\n pub capped: bool,\n}\n"
|
|
},
|
|
{
|
|
"file": "model.rs",
|
|
"line": 33,
|
|
"type": "MaxOccurs",
|
|
"derives": [
|
|
"Debug",
|
|
"Clone",
|
|
"Copy",
|
|
"PartialEq",
|
|
"Eq"
|
|
],
|
|
"definition": "#[derive(Debug, Clone, Copy, PartialEq, Eq)]\npub(crate) enum MaxOccurs {\n /// At most this many occurrences.\n Limited(u16),\n /// No upper bound (`maxOccurs=\"unbounded\"`).\n Unbounded,\n}\n"
|
|
},
|
|
{
|
|
"file": "model.rs",
|
|
"line": 42,
|
|
"type": "Compositor",
|
|
"derives": [
|
|
"Debug",
|
|
"Clone",
|
|
"Copy",
|
|
"PartialEq",
|
|
"Eq"
|
|
],
|
|
"definition": "#[derive(Debug, Clone, Copy, PartialEq, Eq)]\npub(crate) enum Compositor {\n /// `xsd:sequence`: slots in a fixed order.\n Sequence,\n /// `xsd:choice`: one of the slots sharing a `choice_group`.\n Choice,\n /// `xsd:all`: each slot at most once, any order.\n All,\n}\n"
|
|
},
|
|
{
|
|
"file": "model.rs",
|
|
"line": 53,
|
|
"type": "ChildSpec",
|
|
"derives": [
|
|
"Debug",
|
|
"Clone",
|
|
"Copy",
|
|
"PartialEq",
|
|
"Eq"
|
|
],
|
|
"definition": "#[derive(Debug, Clone, Copy, PartialEq, Eq)]\npub(crate) struct ChildSpec {\n /// Prefixed element name, e.g. `w:tblPr`; `<any>` for an `xsd:any` wildcard.\n pub name: &'static str,\n /// Minimum occurrences, with the enclosing particles' minOccurs multiplied in.\n pub min: u16,\n /// Maximum occurrences, with the enclosing particles' maxOccurs multiplied in.\n pub max: MaxOccurs,\n /// The compositor this slot sits in.\n pub compositor: Compositor,\n /// The choice group id shared by the members of one `xsd:choice`, if any.\n pub choice_group: Option<&'static str>,\n /// Index of this slot in the type's flattened child list.\n pub position: u16,\n}\n"
|
|
},
|
|
{
|
|
"file": "model.rs",
|
|
"line": 70,
|
|
"type": "TypeModel",
|
|
"derives": [
|
|
"Debug",
|
|
"Clone",
|
|
"Copy",
|
|
"PartialEq",
|
|
"Eq"
|
|
],
|
|
"definition": "#[derive(Debug, Clone, Copy, PartialEq, Eq)]\npub(crate) struct TypeModel {\n /// Namespace-qualified type key, e.g. `w:CT_Tc`, `a:CT_FontCollection`.\n pub key: &'static str,\n /// The type's child slots in flattened schema order.\n pub children: &'static [ChildSpec],\n}\n"
|
|
},
|
|
{
|
|
"file": "model.rs",
|
|
"line": 79,
|
|
"type": "Variant",
|
|
"derives": [
|
|
"Debug",
|
|
"Clone",
|
|
"Copy",
|
|
"PartialEq",
|
|
"Eq"
|
|
],
|
|
"definition": "#[derive(Debug, Clone, Copy, PartialEq, Eq)]\npub(crate) struct Variant {\n /// The type key of this declaration (may name a simple or out-of-scope type\n /// that has no [`TypeModel`]; such an element is unmodelled).\n pub type_key: &'static str,\n /// Parent type keys this variant is selected under (group contexts expanded).\n pub contexts: &'static [&'static str],\n}\n"
|
|
},
|
|
{
|
|
"file": "model.rs",
|
|
"line": 89,
|
|
"type": "ElementModel",
|
|
"derives": [
|
|
"Debug",
|
|
"Clone",
|
|
"Copy",
|
|
"PartialEq",
|
|
"Eq"
|
|
],
|
|
"definition": "#[derive(Debug, Clone, Copy, PartialEq, Eq)]\npub(crate) struct ElementModel {\n /// Prefixed element name, e.g. `w:sectPr`.\n pub name: &'static str,\n /// The type key used in the most declaration contexts.\n pub canonical: &'static str,\n /// Every declared type, sorted by type key.\n pub variants: &'static [Variant],\n}\n"
|
|
}
|
|
],
|
|
"package_producer_and_loss_sites": [
|
|
{
|
|
"line": 86,
|
|
"text": " pub content_unavailable: bool,"
|
|
},
|
|
{
|
|
"line": 231,
|
|
"text": "pub(crate) struct Package {"
|
|
},
|
|
{
|
|
"line": 249,
|
|
"text": " pub entries_truncated: bool,"
|
|
},
|
|
{
|
|
"line": 251,
|
|
"text": " pub identity_incomplete: bool,"
|
|
},
|
|
{
|
|
"line": 272,
|
|
"text": " let entries_truncated = zip.len() > limits.entries;"
|
|
},
|
|
{
|
|
"line": 273,
|
|
"text": " if entries_truncated {"
|
|
},
|
|
{
|
|
"line": 282,
|
|
"text": " let mut unknown_unreadable = false;"
|
|
},
|
|
{
|
|
"line": 300,
|
|
"text": " Some(n) if n.ends_with('/') => entries.push(blank_entry(n, true)),"
|
|
},
|
|
{
|
|
"line": 304,
|
|
"text": " Some(n) => entries.push(blank_entry(n, false)),"
|
|
},
|
|
{
|
|
"line": 308,
|
|
"text": " // established (see `Acc::set_unknown_unreadable` and `ABSENCE_RULES`)."
|
|
},
|
|
{
|
|
"line": 309,
|
|
"text": " None => unknown_unreadable = true,"
|
|
},
|
|
{
|
|
"line": 316,
|
|
"text": " entries.push(blank_entry(name, true));"
|
|
},
|
|
{
|
|
"line": 323,
|
|
"text": " entries.push(blank_entry(name, false));"
|
|
},
|
|
{
|
|
"line": 329,
|
|
"text": " entries.push(blank_entry(name, false));"
|
|
},
|
|
{
|
|
"line": 337,
|
|
"text": " entries.push(blank_entry(name, false));"
|
|
},
|
|
{
|
|
"line": 341,
|
|
"text": " entries.push(text_entry(name, buf));"
|
|
},
|
|
{
|
|
"line": 348,
|
|
"text": " entries.push(blank_entry(name, false));"
|
|
},
|
|
{
|
|
"line": 353,
|
|
"text": " if unknown_unreadable {"
|
|
},
|
|
{
|
|
"line": 354,
|
|
"text": " acc.set_unknown_unreadable();"
|
|
},
|
|
{
|
|
"line": 364,
|
|
"text": " if !content_types_present && !entries_truncated {"
|
|
},
|
|
{
|
|
"line": 367,
|
|
"text": " let mut content_types = ContentTypes { incomplete: !content_types_present && entries_truncated, ..ContentTypes::default() };"
|
|
},
|
|
{
|
|
"line": 373,
|
|
"text": " content_types.incomplete = true;"
|
|
},
|
|
{
|
|
"line": 378,
|
|
"text": " content_types.incomplete = true;"
|
|
},
|
|
{
|
|
"line": 383,
|
|
"text": " content_types.incomplete |= ct_at.and_then(|i| entries.get(i)).is_some_and(|e| e.content_unavailable);"
|
|
},
|
|
{
|
|
"line": 397,
|
|
"text": " for e in entries.iter_mut().filter(|e| !e.is_dir) {"
|
|
},
|
|
{
|
|
"line": 420,
|
|
"text": " let package_rels_unavailable = entries.iter().any(|e| !e.is_dir && e.name.eq_ignore_ascii_case(\"_rels/.rels\") && e.content_unavailable);"
|
|
},
|
|
{
|
|
"line": 421,
|
|
"text": " let discovery_complete = !entries_truncated && !unknown_unreadable && !package_rels_unavailable && !package_rels.is_some_and(|rp| rp.incomplete);"
|
|
},
|
|
{
|
|
"line": 434,
|
|
"text": " glossary_part(&entries, &content_types, &rels, main_name, !entries_truncated && !unknown_unreadable)"
|
|
},
|
|
{
|
|
"line": 443,
|
|
"text": " Some(Package {"
|
|
},
|
|
{
|
|
"line": 453,
|
|
"text": " entries_truncated,"
|
|
},
|
|
{
|
|
"line": 454,
|
|
"text": " identity_incomplete: unknown_unreadable,"
|
|
},
|
|
{
|
|
"line": 517,
|
|
"text": " && !entries.iter().any(|e| e.name.eq_ignore_ascii_case(\"[Content_Types].xml\") && e.content_unavailable)"
|
|
},
|
|
{
|
|
"line": 521,
|
|
"text": " && !entries.iter().any(|e| e.name.eq_ignore_ascii_case(&want) && e.content_unavailable)"
|
|
},
|
|
{
|
|
"line": 534,
|
|
"text": " Entry { name, bytes: None, is_dir, decoded: None, decode_error: None, content_unavailable: !is_dir }"
|
|
},
|
|
{
|
|
"line": 557,
|
|
"text": " let content_unavailable = decode_error.is_some();"
|
|
},
|
|
{
|
|
"line": 558,
|
|
"text": " Entry { name, bytes: Some(bytes), is_dir: false, decoded, decode_error, content_unavailable }"
|
|
},
|
|
{
|
|
"line": 577,
|
|
"text": " e.content_unavailable = decode_error.is_some();"
|
|
},
|
|
{
|
|
"line": 1022,
|
|
"text": "pub(crate) fn content_unavailable(pkg: &Package, name: &str) -> bool {"
|
|
},
|
|
{
|
|
"line": 1023,
|
|
"text": " entry_by_name(pkg, name).is_some_and(|e| e.content_unavailable)"
|
|
},
|
|
{
|
|
"line": 1161,
|
|
"text": " ((pkg.entries_truncated || pkg.identity_incomplete) && entry_by_name(pkg, &name).is_none())"
|
|
},
|
|
{
|
|
"line": 1162,
|
|
"text": " || content_unavailable(pkg, &name)"
|
|
},
|
|
{
|
|
"line": 1203,
|
|
"text": " let complete = !pkg.entries_truncated"
|
|
},
|
|
{
|
|
"line": 1204,
|
|
"text": " && !pkg.identity_incomplete"
|
|
},
|
|
{
|
|
"line": 1205,
|
|
"text": " && !content_unavailable(pkg, \"_rels/.rels\")"
|
|
},
|
|
{
|
|
"line": 1251,
|
|
"text": " ct.incomplete |= capped || !complete;"
|
|
}
|
|
],
|
|
"package_producer_source": "/// Load a zip into the package model. Returns `None` only when the input is not a readable zip\n/// (after a `PKG-NOT-ZIP` finding): every other problem becomes a finding or a coverage note.\npub(crate) fn load(bytes: &[u8], acc: &mut Acc) -> Option<Package> {\n observation_contract! {\n rules: \"PKG-NO-CONTENT-TYPES,PKG-NO-MAIN,PKG-NOT-ZIP\";\n collections: \"field.bytes*1,field.entries*6,field.incomplete*5,field.rels*1,parser.parse_content_types*1,type.Vec*2\";\n scope: \"source-local bounded extraction; no implicit document owner\";\n loss: \"source unavailable or malformed; XML event/depth budget; category allocation cap\";\n fallback: \"retain proven prefix presence and duplicates; return loss to the caller; no negative membership from an incomplete set\";\n package_loss: \"PKG-NO-CONTENT-TYPES,PKG-NO-MAIN\";\n }\n\n acc.ran(\"PKG-NOT-ZIP\");\n let Ok(mut zip) = zip::ZipArchive::new(Cursor::new(bytes)) else {\n acc.add(\"PKG-NOT-ZIP\", None, \"the input is not a readable zip archive\".to_string());\n return None;\n };\n let limits = acc.limits;\n let entries_truncated = zip.len() > limits.entries;\n if entries_truncated {\n acc.note(format!(\"the archive declares {} entries; only the first {} were examined\", zip.len(), limits.entries));\n acc.set_incomplete();\n }\n let limit = zip.len().min(limits.entries);\n let mut entries = Vec::new();\n let mut total: u64 = 0;\n // Set when an entry that failed to open could not be named at all. Its identity is unknown, so\n // nothing can be concluded about what is absent from the package while it is set.\n let mut unknown_unreadable = false;\n for i in 0..limit {\n // The identity is read before opening: `by_index` holds a mutable borrow of the archive for\n // the whole match, so the name must be cloned first. Both come from the same table, keyed by\n // the same index, so the recovered name can never disagree with the entry that failed.\n let name = zip.name_for_index(i).map(|n| n.trim_start_matches('/').to_string());\n let mut f = match zip.by_index(i) {\n Ok(f) => f,\n Err(_) => {\n let described = match &name {\n Some(n) => format!(\"entry {i} ({n})\"),\n None => format!(\"entry {i}\"),\n };\n acc.note(format!(\"{described} could not be read from the archive and was not checked\"));\n acc.set_incomplete();\n match name {\n // A directory entry: never register it as a part (the readable path skips\n // directories too, and the unreadable path must not invent one).\n Some(n) if n.ends_with('/') => entries.push(blank_entry(n, true)),\n // Register the part as present-but-unchecked. Its content is marked unavailable,\n // which is what makes every cross-part check that would conclude absence from it\n // skip; the marker, not the mere registration, is the mechanism.\n Some(n) => entries.push(blank_entry(n, false)),\n // `name_for_index` and `by_index` index the same table and the loop is bounded\n // by `zip.len()`, so this should be unreachable. If it happens, an entry of\n // unknown identity exists: it could be any part, so no absence conclusion is\n // established (see `Acc::set_unknown_unreadable` and `ABSENCE_RULES`).\n None => unknown_unreadable = true,\n }\n continue;\n }\n };\n let name = f.name().trim_start_matches('/').to_string();\n if f.is_dir() {\n entries.push(blank_entry(name, true));\n continue;\n }\n let size = f.size();\n if size > limits.part_bytes {\n acc.note(format!(\"part {name} is larger than the {}-byte per-part limit and was not checked\", limits.part_bytes));\n acc.set_incomplete();\n entries.push(blank_entry(name, false));\n continue;\n }\n if total.saturating_add(size) > limits.total_bytes {\n acc.note(format!(\"part {name} would take the package past the {}-byte total limit and was not checked\", limits.total_bytes));\n acc.set_incomplete();\n entries.push(blank_entry(name, false));\n continue;\n }\n let mut buf = Vec::with_capacity(size.min(1 << 20) as usize);\n match (&mut f).take(limits.part_bytes + 1).read_to_end(&mut buf) {\n Ok(_) if buf.len() as u64 > limits.part_bytes => {\n acc.note(format!(\"part {name} decompresses past the {}-byte per-part limit and was not checked\", limits.part_bytes));\n acc.set_incomplete();\n entries.push(blank_entry(name, false));\n }\n Ok(_) => {\n total = total.saturating_add(buf.len() as u64);\n entries.push(text_entry(name, buf));\n }\n Err(_) => {\n // Any part whose content could not be read leaves the run INCOMPLETE: a check that\n // depended on it could not run. (This subsumes the old main-part special case.)\n acc.note(format!(\"part {name} could not be decompressed and was not checked\"));\n acc.set_incomplete();\n entries.push(blank_entry(name, false));\n }\n }\n }\n\n if unknown_unreadable {\n acc.set_unknown_unreadable();\n }\n let cd = central_directory(bytes, acc.limits.entries);\n check_duplicate_entries(cd.as_ref(), acc);\n check_case_collisions(cd.as_ref(), &entries, acc);\n\n let ct_at = entries.iter().position(|e| !e.is_dir && e.name.eq_ignore_ascii_case(\"[Content_Types].xml\"));\n acc.ran(\"PKG-NO-CONTENT-TYPES\");\n let content_types_present = ct_at.is_some();\n // The archive suffix may hold the manifest; a prefix cannot establish its absence.\n if !content_types_present && !entries_truncated {\n acc.add(\"PKG-NO-CONTENT-TYPES\", None, \"the package has no [Content_Types].xml part, so part content types cannot be resolved\".to_string());\n }\n let mut content_types = ContentTypes { incomplete: !content_types_present && entries_truncated, ..ContentTypes::default() };\n let mut ct_guard = ParseGuard::new(limits.events, limits.depth);\n if let Some(e) = ct_at.and_then(|i| entries.get(i))\n && let Some(text) = &e.decoded\n && parse_content_types(text, &mut content_types, limits.entries, &mut ct_guard)\n {\n content_types.incomplete = true;\n acc.note(format!(\"[Content_Types].xml declares more than {} entries; later ones were not recorded\", limits.entries));\n acc.set_incomplete();\n }\n if ct_guard.exhausted() {\n content_types.incomplete = true;\n acc.note(format!(\"[Content_Types].xml exceeded the XML {} budget; later declarations were not recorded\", ct_guard.budget()));\n acc.set_incomplete();\n }\n\n content_types.incomplete |= ct_at.and_then(|i| entries.get(i)).is_some_and(|e| e.content_unavailable);\n if content_types.incomplete {\n // Parser errors suppress manifest-dependent checks just as budget stops do.\n acc.note(\"[Content_Types].xml declarations were not fully examined; dependent absence checks were skipped\".to_string());\n acc.set_incomplete();\n }\n\n let rels = load_rels(&entries, acc);\n\n // Classify XML parts once (J4) and decode every classified part, whichever its file name, so a\n // supporting or story part with an unconventional name still has its checks run (H5). The\n // classification is content type (+xml / text/xml / the rels type) OR a recognised relationship\n // role.\n let xml_parts = classified_xml_parts(&entries, &content_types, &rels);\n for e in entries.iter_mut().filter(|e| !e.is_dir) {\n if e.decoded.is_some() || e.decode_error.is_some() || e.bytes.is_none() {\n continue;\n }\n if xml_parts.contains(&e.name.to_ascii_lowercase()) {\n decode_entry(e);\n }\n }\n\n acc.ran(\"PKG-NO-MAIN\");\n let package_rels = rels.iter().find(|r| r.name.eq_ignore_ascii_case(\"_rels/.rels\"));\n let main_ambiguous = competing_targets(package_rels, is_office_document_relationship);\n if main_ambiguous {\n acc.note(\n \"ambiguous officeDocument selection for the package: distinct official targets compete; owner-dependent document checks were skipped\"\n .to_string(),\n );\n acc.set_incomplete();\n }\n let main = package_rels\n .and_then(|rp| rp.rels.iter().find(|r| !r.external && is_office_document_relationship(&r.kind)))\n .and_then(|r| r.target_abs.as_deref())\n .and_then(|t| canonical(&entries, t));\n let package_rels_unavailable = entries.iter().any(|e| !e.is_dir && e.name.eq_ignore_ascii_case(\"_rels/.rels\") && e.content_unavailable);\n let discovery_complete = !entries_truncated && !unknown_unreadable && !package_rels_unavailable && !package_rels.is_some_and(|rp| rp.incomplete);\n let main =\n if main_ambiguous { Resolution::Ambiguous(\"distinct official targets compete\") } else { Resolution::discovered(main, discovery_complete) };\n if matches!(main, Resolution::Absent) {\n acc.add(\"PKG-NO-MAIN\", None, no_main_message(package_rels));\n }\n let main_name = match &main {\n Resolution::One(name) => Some(name.as_str()),\n Resolution::Absent | Resolution::Ambiguous(_) | Resolution::Unknown(_) => None,\n };\n let glossary = if main_ambiguous {\n Resolution::Unknown(\"package main is ambiguous\")\n } else {\n glossary_part(&entries, &content_types, &rels, main_name, !entries_truncated && !unknown_unreadable)\n };\n let glossary_ambiguous = matches!(glossary, Resolution::Ambiguous(_));\n if let Resolution::Ambiguous(reason) = &glossary {\n acc.note(format!(\"ambiguous glossaryDocument selection: {reason}; owner-dependent document checks were skipped\"));\n acc.set_incomplete();\n }\n let roots_ambiguous = main_ambiguous || glossary_ambiguous;\n let reachable = reachability(&rels, main_name);\n Some(Package {\n entries,\n content_types,\n content_types_present,\n rels,\n main,\n glossary,\n roots_ambiguous,\n reachable,\n xml_parts,\n entries_truncated,\n identity_incomplete: unknown_unreadable,\n })\n}\n\n/// Whether official relationships for one singleton role name distinct internal target parts.",
|
|
"observed_accessors": [
|
|
{
|
|
"line": 20,
|
|
"text": " fn default() -> Self {"
|
|
},
|
|
{
|
|
"line": 26,
|
|
"text": " pub(crate) fn complete(value: T) -> Self {"
|
|
},
|
|
{
|
|
"line": 30,
|
|
"text": " pub(crate) fn with_status(value: T, completeness: Completeness) -> Self {"
|
|
},
|
|
{
|
|
"line": 34,
|
|
"text": " pub(crate) fn prefix(&self) -> &T {"
|
|
},
|
|
{
|
|
"line": 38,
|
|
"text": " pub(crate) fn is_complete(&self) -> bool {"
|
|
},
|
|
{
|
|
"line": 42,
|
|
"text": " pub(crate) fn invalidate(&mut self, reason: Reason) {"
|
|
},
|
|
{
|
|
"line": 46,
|
|
"text": " pub(crate) fn project<U>(&self, map: impl FnOnce(&T) -> U) -> Observed<U> {"
|
|
},
|
|
{
|
|
"line": 52,
|
|
"text": " pub(crate) fn push_bounded(&mut self, value: T, cap: usize) -> bool {"
|
|
},
|
|
{
|
|
"line": 62,
|
|
"text": " pub(crate) fn retain_budget(&mut self, held: &mut usize, cap: usize) -> bool {"
|
|
},
|
|
{
|
|
"line": 73,
|
|
"text": " pub(crate) fn append(&mut self, from: &Self)"
|
|
},
|
|
{
|
|
"line": 83,
|
|
"text": " pub(crate) fn len(&self) -> usize {"
|
|
},
|
|
{
|
|
"line": 93,
|
|
"text": " pub(crate) fn into_complete_set(self) -> Option<CompleteSet<K>> {"
|
|
},
|
|
{
|
|
"line": 99,
|
|
"text": " pub(crate) fn missing(&self, key: &K) -> bool {"
|
|
}
|
|
],
|
|
"count_references": [
|
|
{
|
|
"file": "log/astra-delta17-prompt.md",
|
|
"sites": [
|
|
{
|
|
"line": 33,
|
|
"text": "- Register: 195 rows (181 consumers + 1 macro-instantiation + 13 providers);"
|
|
},
|
|
{
|
|
"line": 36,
|
|
"text": "- Evidence: 77 source mutations + drift rejected; the six delta-16 probes"
|
|
},
|
|
{
|
|
"line": 64,
|
|
"text": " 181 contract rows preserved, register 195)."
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"file": "log/fredfix-round12-result.md",
|
|
"sites": [
|
|
{
|
|
"line": 99,
|
|
"text": " crates/validate/tests/entry_point_profiles.rs | 195 ++++++++++++++++++++++++++"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"file": "log/fredfix-round17-result.md",
|
|
"sites": [
|
|
{
|
|
"line": 5,
|
|
"text": "**W6 now uses fail-closed syntax recognition.** The production source corpus passes, all **77 source mutations plus generated-output drift** are rejected, and the six delta-16 probes accepted by the base with byte-identical outputs are rejected. These are in-memory generator mutations, not compiled mutated Rust fixtures. The completed self-test transplanted onto the base fails at the first delta-16 destructuring assignment. See `fredfix-round17-base-discrimination.json`, `fredfix-round17-base-self-test.log`, and `fredfix-round17-completed-self-test.log`."
|
|
},
|
|
{
|
|
"line": 11,
|
|
"text": "The generated register now has **195 rows**: the previous 181 consumer rows, one additional numeric-ID macro-instantiation row, and 13 representation-provider rows. Its boundary wording lists the six audited production files, test/table/generated-file exclusions, macro grammar, and the uninspected build-script/compiler/procedural-macro expansions (including the existing serde Serialize derive). It explicitly disclaims Rust name resolution and general alias/dataflow proof. The generated Rust policy and all **22 validator Rust source/test files** are byte-unchanged, as are all ten synthetic corpus files. See `fredfix-round17-preservation.json` and `fredfix-round17-register-preservation.json`; all 181 original contract rows are preserved."
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"file": "log/fredfix-round18-amendment-1.md",
|
|
"sites": [
|
|
{
|
|
"line": 116,
|
|
"text": "195 rows / 77 mutations and where it lives. Probes 47\u201349 bind at the end."
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"file": "log/fredfix-round18-brief.md",
|
|
"sites": [
|
|
{
|
|
"line": 7,
|
|
"text": "rejected; register byte-exact 195 rows; 503/503). The findings are semantic"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"file": "log/kimi-delta17-review.md",
|
|
"sites": [
|
|
{
|
|
"line": 5,
|
|
"text": "Round 17 does reject all four historical syntax-escape families and the requested closed-grammar seam probes. The clean register and test claims also reproduce. It does **not**, however, fail closed around absence judgments: a one-line removal of the `REL-DANGLING` truncation guard was accepted with the unchanged 195-row register and then produced exactly the false absence finding the observation contract is meant to prevent. Additional compiled mutations bypass raw-membership and `Observed` checks without adding a register row. The disclosed name-resolution/dataflow and derive boundaries are load-bearing, not merely theoretical."
|
|
},
|
|
{
|
|
"line": 33,
|
|
"text": "195 declared bounded consumers; register and access audit passed"
|
|
},
|
|
{
|
|
"line": 74,
|
|
"text": "Both commands `probe.py escape/raw-iterator-absence` and `probe.py escape/helper-mediated-package-absence` returned exit 0 with the same `195 declared bounded consumers` output, and `cargo check --offline` returned exit 0 for each complete mutated crate. I also replaced the body of the existing `canonical(&[Entry], \u2026)` helper with an equivalent `iter().any(...)` absence precheck (`escape/existing-canonical-iterator-absence`): the gate and full crate check both passed with no new row."
|
|
},
|
|
{
|
|
"line": 94,
|
|
"text": "195 declared bounded consumers; register and access audit passed"
|
|
},
|
|
{
|
|
"line": 131,
|
|
"text": "195 declared bounded consumers; register and access audit passed"
|
|
},
|
|
{
|
|
"line": 168,
|
|
"text": "77 source mutations rejected"
|
|
},
|
|
{
|
|
"line": 171,
|
|
"text": "195 declared bounded consumers; register and access audit passed"
|
|
},
|
|
{
|
|
"line": 193,
|
|
"text": "generated_rows: 195"
|
|
},
|
|
{
|
|
"line": 194,
|
|
"text": "markdown_rows: 195"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"file": "log/kimi-r18-redteam.md",
|
|
"sites": [
|
|
{
|
|
"line": 174,
|
|
"text": "7. **Hard-coded register/test-count expectations and golden artifacts** outside the two generated outputs. Any fixture asserting 195 rows or 77 rejected mutations needs a class-authorized expectation update; the documents do not identify where these live."
|
|
},
|
|
{
|
|
"line": 528,
|
|
"text": " **Expected:** exit 0; production corpus and non-consuming controls accepted; every still-negative historical/seam probe and every probe designated gate-negative above rejected (compile/type barriers run separately); the `seam/other-macro-path` expectation explicitly resolved per probe 24. Markdown and generated Rust are byte-current. Report row-count deltas by named new caller/derive contract rather than \u201cmore rows are expected\u201d; the previous 195-row count alone is not a sufficient assertion after this redesign. The 13 representation provider identities stay matched, with only justified R4 additions."
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"file": "log/redesign-lane-result.md",
|
|
"sites": [
|
|
{
|
|
"line": 31,
|
|
"text": "1. `crates/validate/src/glossary_descendant_tests.rs:77` \u2014 `selected_glossary_keeps_nested_glossary_header_in_both_zip_orders`. Existing: B and its header are both asserted to have A membership [1], including with incomplete discovery. Required change and individual justification: W4 makes B a separate glossary owner; B and its header belong to B. The direct A-to-header variant additionally gives that header an A context, not B itself."
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"file": "log/redesign-lane-result2.md",
|
|
"sites": [
|
|
{
|
|
"line": 28,
|
|
"text": "1. `selected_glossary_keeps_nested_glossary_header_in_both_zip_orders` (`glossary_descendant_tests.rs:77`): B and its header must belong to B, including incomplete discovery. A's direct header edge additionally gives the header A membership; it does not give B itself A membership. A traversal cannot absorb B's root."
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"resolution_sites": [
|
|
{
|
|
"file": "crates/validate/src/glossary_descendant_tests.rs",
|
|
"line": 107,
|
|
"text": " Resolution::One(name) => Some(name.as_str()),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/glossary_descendant_tests.rs",
|
|
"line": 108,
|
|
"text": " Resolution::Absent | Resolution::Ambiguous(_) | Resolution::Unknown(_) => None,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/glossary_descendant_tests.rs",
|
|
"line": 133,
|
|
"text": " pkg.main = Resolution::Absent;"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/glossary_descendant_tests.rs",
|
|
"line": 134,
|
|
"text": " pkg.glossary = Resolution::Absent;"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/glossary_descendant_tests.rs",
|
|
"line": 205,
|
|
"text": " pkg.glossary = Resolution::One(\"word/glossary/document.xml\".to_string());"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/glossary_descendant_tests.rs",
|
|
"line": 206,
|
|
"text": " assert!(!matches!(pkg.main, Resolution::One(_)));"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/glossary_tests.rs",
|
|
"line": 98,
|
|
"text": " assert!(!matches!(pkg.glossary, Resolution::One(_)));"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/glossary_tests.rs",
|
|
"line": 144,
|
|
"text": " Resolution::One(name) => Some(name.as_str()),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/glossary_tests.rs",
|
|
"line": 145,
|
|
"text": " Resolution::Absent | Resolution::Ambiguous(_) | Resolution::Unknown(_) => None,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/glossary_tests.rs",
|
|
"line": 168,
|
|
"text": " assert!(!matches!(pkg.main, Resolution::One(_)));"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/glossary_tests.rs",
|
|
"line": 171,
|
|
"text": " Resolution::One(name) => Some(name.as_str()),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/glossary_tests.rs",
|
|
"line": 172,
|
|
"text": " Resolution::Absent | Resolution::Ambiguous(_) | Resolution::Unknown(_) => None,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/glossary_tests.rs",
|
|
"line": 197,
|
|
"text": " assert!(!matches!(pkg.main, Resolution::One(_)));"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/glossary_tests.rs",
|
|
"line": 198,
|
|
"text": " assert!(!matches!(pkg.glossary, Resolution::One(_)));"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 47,
|
|
"text": "use resolution::Resolution;"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 769,
|
|
"text": " Resolution::Ambiguous(_) => {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 777,
|
|
"text": " Resolution::One(package::EntryPointProfile::Strict) => {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 784,
|
|
"text": " Resolution::One(package::EntryPointProfile::Transitional) | Resolution::Absent | Resolution::Unknown(_) => {}"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 919,
|
|
"text": " if let Resolution::One(main) = &pkg.main"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 980,
|
|
"text": " Resolution::One(name) => Some(name.as_str()),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 981,
|
|
"text": " Resolution::Absent | Resolution::Ambiguous(_) | Resolution::Unknown(_) => None,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 987,
|
|
"text": " let message = if pkg.roots_ambiguous && !matches!(pkg.main, Resolution::One(_)) {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1538,
|
|
"text": " Resolution::One(rel) => {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1541,
|
|
"text": " Resolution::Absent | Resolution::Ambiguous(_) | Resolution::Unknown(_) => false,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1570,
|
|
"text": " ids.retain(|id| matches!(by_id.resolve(id.as_str()), Resolution::One(rel) if is_ink(rel)));"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1609,
|
|
"text": " && matches!(selected[0], Resolution::One(_) | Resolution::Absent)"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1611,
|
|
"text": " Resolution::One(entry) => complete(Some(entry)),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1612,
|
|
"text": " Resolution::Absent => true,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1613,
|
|
"text": " Resolution::Ambiguous(_) | Resolution::Unknown(_) => false,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1619,
|
|
"text": " && matches!(selected[1], Resolution::One(_) | Resolution::Absent)"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1621,
|
|
"text": " Resolution::One(entry) => complete(Some(entry)) && xml.category_complete(&entry.name, |f| &f.footnote_defs),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1622,
|
|
"text": " Resolution::Absent => true,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1623,
|
|
"text": " Resolution::Ambiguous(_) | Resolution::Unknown(_) => false,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1626,
|
|
"text": " && matches!(selected[2], Resolution::One(_) | Resolution::Absent)"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1628,
|
|
"text": " Resolution::One(entry) => complete(Some(entry)) && xml.category_complete(&entry.name, |f| &f.endnote_defs),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1629,
|
|
"text": " Resolution::Absent => true,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1630,
|
|
"text": " Resolution::Ambiguous(_) | Resolution::Unknown(_) => false,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1654,
|
|
"text": " Resolution::One(entry) => Some(entry),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1655,
|
|
"text": " Resolution::Absent => None,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1656,
|
|
"text": " Resolution::Ambiguous(_) | Resolution::Unknown(_) => None,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1659,
|
|
"text": " forward_ok && matches!(selected[1], Resolution::One(_) | Resolution::Absent),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1660,
|
|
"text": " forward_ok && matches!(selected[2], Resolution::One(_) | Resolution::Absent),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1801,
|
|
"text": " let Resolution::One(rel) = by_id.resolve(id.as_str()) else { continue };"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1828,
|
|
"text": " Resolution::One(name) => Some(name.as_str()),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1829,
|
|
"text": " Resolution::Absent | Resolution::Ambiguous(_) | Resolution::Unknown(_) => None,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 1856,
|
|
"text": " if let Resolution::One(main) = &pkg.main {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2019,
|
|
"text": " let Resolution::One(rel) = by_id.resolve(r.value.as_str()) else { continue };"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2100,
|
|
"text": " let Resolution::One(main) = &pkg.main else { return };"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2252,
|
|
"text": " Resolution::One(name) => Some(name.as_str()),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2253,
|
|
"text": " Resolution::Absent | Resolution::Ambiguous(_) | Resolution::Unknown(_) => None,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2495,
|
|
"text": " Resolution::One(entry) => {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2502,
|
|
"text": " Resolution::Absent => Observed::complete(HashSet::new()),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2503,
|
|
"text": " Resolution::Ambiguous(_) | Resolution::Unknown(_) => continue,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2556,
|
|
"text": " Resolution::Ambiguous(_) | Resolution::Unknown(_)"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2606,
|
|
"text": " let Resolution::One(main) = &pkg.main else { return };"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2631,
|
|
"text": " Resolution::Unknown(_) | Resolution::Ambiguous(_) => {}"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2632,
|
|
"text": " Resolution::Absent => {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2635,
|
|
"text": " Resolution::One(rel) if rel.role.kind() != Some(kind) => acc.add("
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2643,
|
|
"text": " Resolution::One(rel) if rel.external || rel.target_abs.is_none() => acc.add("
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2648,
|
|
"text": " Resolution::One(rel) => {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2667,
|
|
"text": "fn owner_rel_part<'a>(pkg: &'a Package, owner: &str, kind: &str) -> Resolution<&'a package::Entry> {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2679,
|
|
"text": " return Resolution::discovered(None, !discovery_unavailable(pkg, Some(owner)));"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2688,
|
|
"text": " return Resolution::Ambiguous(\"distinct official targets compete\");"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2693,
|
|
"text": " Resolution::discovered(target.and_then(|name| entry_by_name(pkg, name)), !discovery_unavailable(pkg, Some(owner)))"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2697,
|
|
"text": "fn owner_rel_selection<'a>(pkg: &'a Package, owner: Option<&str>, kind: &str, ct: &str) -> Resolution<&'a package::Entry> {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2707,
|
|
"text": "fn supporting_part<'a>(pkg: &'a Package, owner: Option<&str>, kind: &str, ct: &str, acc: &mut Acc) -> Resolution<&'a package::Entry> {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2719,
|
|
"text": " Resolution::One(_) | Resolution::Absent => None,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2720,
|
|
"text": " Resolution::Ambiguous(reason) => {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2723,
|
|
"text": " Resolution::Unknown(reason) => {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2833,
|
|
"text": " selection_ambiguous |= matches!(selection, Resolution::Ambiguous(_) | Resolution::Unknown(_));"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2835,
|
|
"text": " Resolution::One(entry) => entry,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2836,
|
|
"text": " Resolution::Absent | Resolution::Ambiguous(_) | Resolution::Unknown(_) => {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2925,
|
|
"text": " if let Resolution::One(entry) = supporting_part(pkg, owner.root(), \"styles\", package::STYLES_CONTENT_TYPE, acc) {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2928,
|
|
"text": " if let Resolution::One(entry) = supporting_part(pkg, owner.root(), \"fontTable\", package::FONT_TABLE_CONTENT_TYPE, acc) {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2933,
|
|
"text": " Resolution::One(entry) => {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2937,
|
|
"text": " Resolution::Absent => true,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2938,
|
|
"text": " Resolution::Ambiguous(reason) => {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 2943,
|
|
"text": " Resolution::Unknown(reason) => {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3124,
|
|
"text": "fn find_by_type<'a>(pkg: &'a Package, ct: &str) -> Resolution<&'a package::Entry> {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3137,
|
|
"text": " return Resolution::Ambiguous(\"multiple content-type candidates compete\");"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3139,
|
|
"text": " Resolution::discovered(first, !discovery_unavailable(pkg, None))"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3171,
|
|
"text": " Resolution::One(e) => Some(e.name.clone()),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3172,
|
|
"text": " Resolution::Absent | Resolution::Ambiguous(_) | Resolution::Unknown(_) => None,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3189,
|
|
"text": " if matches!(selection, Resolution::Ambiguous(_) | Resolution::Unknown(_)) || discovery_unavailable(pkg, owner.root()) {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3199,
|
|
"text": " if let Resolution::One(entry) = supporting_part(pkg, owner.root(), \"styles\", package::STYLES_CONTENT_TYPE, acc)"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3398,
|
|
"text": " !matches!(owner_rel_selection(pkg, owner.root(), \"commentsExtended\", package::COMMENTS_EXTENDED_CONTENT_TYPE), Resolution::Absent)"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3399,
|
|
"text": " || !matches!(owner_rel_selection(pkg, owner.root(), \"commentsIds\", package::COMMENTS_IDS_CONTENT_TYPE), Resolution::Absent)"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3415,
|
|
"text": " Resolution::One(entry) => entry.name.eq_ignore_ascii_case(part),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3416,
|
|
"text": " Resolution::Absent | Resolution::Ambiguous(_) | Resolution::Unknown(_) => false,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3422,
|
|
"text": " let mut comments_complete = matches!(comments_source, Resolution::One(_) | Resolution::Absent)"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3460,
|
|
"text": " Resolution::One(entry) => read_comments_ext(entry, xml, cap, acc).map(|e| (entry.name.clone(), e)),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3461,
|
|
"text": " Resolution::Absent | Resolution::Ambiguous(_) | Resolution::Unknown(_) => None,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3493,
|
|
"text": " Resolution::One(entry) => read_comments_ids(entry, xml, cap, acc),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3494,
|
|
"text": " Resolution::Absent | Resolution::Ambiguous(_) | Resolution::Unknown(_) => None,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3662,
|
|
"text": " if matches!(selection, Resolution::Ambiguous(_) | Resolution::Unknown(_)) {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3667,
|
|
"text": " Resolution::One(entry) => entry,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3668,
|
|
"text": " Resolution::Ambiguous(_) | Resolution::Unknown(_) => {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 3672,
|
|
"text": " Resolution::Absent => {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 5821,
|
|
"text": " assert!(!matches!(pkg.glossary, Resolution::One(_)));"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 5838,
|
|
"text": " Resolution::One(name) => Some(name.as_str()),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/lib.rs",
|
|
"line": 5839,
|
|
"text": " Resolution::Absent | Resolution::Ambiguous(_) | Resolution::Unknown(_) => None,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/ownership.rs",
|
|
"line": 2,
|
|
"text": "use crate::{Package, Resolution, package};"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/ownership.rs",
|
|
"line": 60,
|
|
"text": " if let Resolution::One(main) = &pkg.main {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/ownership.rs",
|
|
"line": 63,
|
|
"text": " if let Resolution::One(glossary) = &pkg.glossary"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 12,
|
|
"text": "use crate::resolution::Resolution;"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 191,
|
|
"text": " pub(crate) fn resolve(&self, id: &str) -> Resolution<&'a Rel> {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 201,
|
|
"text": " Resolution::discovered(self.first.get(id).copied(), self.complete)"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 218,
|
|
"text": " matches!(self.resolve(rel.id.as_str()), Resolution::One(first) if std::ptr::eq(first, rel))"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 236,
|
|
"text": " pub main: Resolution<String>,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 238,
|
|
"text": " pub glossary: Resolution<String>,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 423,
|
|
"text": " if main_ambiguous { Resolution::Ambiguous(\"distinct official targets compete\") } else { Resolution::discovered(main, discovery_complete) };"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 424,
|
|
"text": " if matches!(main, Resolution::Absent) {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 428,
|
|
"text": " Resolution::One(name) => Some(name.as_str()),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 429,
|
|
"text": " Resolution::Absent | Resolution::Ambiguous(_) | Resolution::Unknown(_) => None,"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 432,
|
|
"text": " Resolution::Unknown(\"package main is ambiguous\")"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 436,
|
|
"text": " let glossary_ambiguous = matches!(glossary, Resolution::Ambiguous(_));"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 437,
|
|
"text": " if let Resolution::Ambiguous(reason) = &glossary {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 489,
|
|
"text": "fn glossary_part(entries: &[Entry], ct: &ContentTypes, rels: &[RelsPart], main: Option<&str>, entries_complete: bool) -> Resolution<String> {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 503,
|
|
"text": " return Resolution::Ambiguous(\"distinct official targets compete\");"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 510,
|
|
"text": " return Resolution::One(name);"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 523,
|
|
"text": " return Resolution::discovered(None, complete);"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 526,
|
|
"text": " return Resolution::Ambiguous(\"multiple glossary-content-typed fallback candidates compete\");"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 528,
|
|
"text": " Resolution::One(first.name.clone())"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 1193,
|
|
"text": "pub(crate) fn entry_point_profile(pkg: &Package) -> Resolution<EntryPointProfile> {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 1208,
|
|
"text": " return Resolution::discovered(None, complete);"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 1220,
|
|
"text": " (true, true) => Resolution::Ambiguous(\"mixed Transitional/Strict entry points\"),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 1221,
|
|
"text": " (true, false) => Resolution::One(EntryPointProfile::Transitional),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 1222,
|
|
"text": " (false, true) => Resolution::One(EntryPointProfile::Strict),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/package.rs",
|
|
"line": 1223,
|
|
"text": " (false, false) => Resolution::discovered(None, complete),"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/resolution.rs",
|
|
"line": 8,
|
|
"text": "pub(crate) enum Resolution<T> {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/resolution.rs",
|
|
"line": 19,
|
|
"text": "impl<T> Resolution<T> {"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/resolution_tests.rs",
|
|
"line": 1,
|
|
"text": "//! Resolution controls exercise discovery states independently of report gates."
|
|
},
|
|
{
|
|
"file": "crates/validate/src/resolution_tests.rs",
|
|
"line": 12,
|
|
"text": " assert!(matches!(owner_rel_part(&pkg, \"word/document.xml\", \"styles\"), Resolution::Absent));"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/resolution_tests.rs",
|
|
"line": 14,
|
|
"text": " assert!(matches!(owner_rel_part(&pkg, \"word/document.xml\", \"styles\"), Resolution::Unknown(_)));"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/resolution_tests.rs",
|
|
"line": 15,
|
|
"text": " assert!(matches!(find_by_type(&pkg, CT_STYLES), Resolution::Unknown(_)));"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/resolution_tests.rs",
|
|
"line": 18,
|
|
"text": " assert!(matches!(owner_rel_part(&pkg, \"word/document.xml\", \"styles\"), Resolution::Unknown(_)));"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/resolution_tests.rs",
|
|
"line": 19,
|
|
"text": " assert!(matches!(find_by_type(&pkg, CT_STYLES), Resolution::Unknown(_)));"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/resolution_tests.rs",
|
|
"line": 33,
|
|
"text": " assert!(matches!(find_by_type(&pkg, CT_STYLES), Resolution::Ambiguous(_)));"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/resolution_tests.rs",
|
|
"line": 42,
|
|
"text": " assert!(matches!(pkg.main, Resolution::Unknown(_)));"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/resolution_tests.rs",
|
|
"line": 43,
|
|
"text": " assert!(matches!(package::entry_point_profile(&pkg), Resolution::Unknown(_)));"
|
|
}
|
|
],
|
|
"count_script_references": [
|
|
{
|
|
"file": "log/fredfix-round17-write-result.py",
|
|
"line": 9,
|
|
"text": "'**W6 now uses fail-closed syntax recognition.** The production source corpus passes, all **77 source mutations plus generated-output drift** are rejected, and the six delta-16 probes accepted by the base with byte-identical outputs are rejected. These are in-memory generator mutations, not compiled mutated Rust fixtures. The completed self-test transplanted onto the base fails at the first delta-16 destructuring assignment. See `fredfix-round17-base-discrimination.json`, `fredfix-round17-base-self-test.log`, and `fredfix-round17-completed-self-test.log`.','',"
|
|
},
|
|
{
|
|
"file": "log/fredfix-round17-write-result.py",
|
|
"line": 12,
|
|
"text": "'The generated register now has **195 rows**: the previous 181 consumer rows, one additional numeric-ID macro-instantiation row, and 13 representation-provider rows. Its boundary wording lists the six audited production files, test/table/generated-file exclusions, macro grammar, and the uninspected build-script/compiler/procedural-macro expansions (including the existing serde Serialize derive). It explicitly disclaims Rust name resolution and general alias/dataflow proof. The generated Rust policy and all **22 validator Rust source/test files** are byte-unchanged, as are all ten synthetic corpus files. See `fredfix-round17-preservation.json` and `fredfix-round17-register-preservation.json`; all 181 original contract rows are preserved.','',"
|
|
},
|
|
{
|
|
"file": "log/redesign2-write-result.py",
|
|
"line": 39,
|
|
"text": "1. `selected_glossary_keeps_nested_glossary_header_in_both_zip_orders` (`glossary_descendant_tests.rs:77`): B and its header must belong to B, including incomplete discovery. A's direct header edge additionally gives the header A membership; it does not give B itself A membership. A traversal cannot absorb B's root."
|
|
}
|
|
],
|
|
"package_test_mutation_sites": [
|
|
{
|
|
"file": "crates/validate/src/glossary_descendant_tests.rs",
|
|
"line": 87,
|
|
"text": " pkg.entries_truncated = incomplete;"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/glossary_tests.rs",
|
|
"line": 120,
|
|
"text": " pkg.entries_truncated = incomplete;"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/ownership.rs",
|
|
"line": 297,
|
|
"text": " pkg.entries_truncated = true;"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/resolution_tests.rs",
|
|
"line": 13,
|
|
"text": " pkg.entries_truncated = true;"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/resolution_tests.rs",
|
|
"line": 16,
|
|
"text": " pkg.entries_truncated = false;"
|
|
},
|
|
{
|
|
"file": "crates/validate/src/resolution_tests.rs",
|
|
"line": 17,
|
|
"text": " pkg.identity_incomplete = true;"
|
|
}
|
|
]
|
|
}
|