Repository navigation
2.0: collection contract (#777) - #799
Merged
Merged
Conversation
#777) Collected<T> carries a collector's state (measured, empty, partial, failed, unsupported, not applicable) through the analysis; CollectionLog records it per page and the pipeline folds the records into module_runs[].subchecks[] with state, method, version and reason. A module that lost a scoring collection is partial and leaves the overall score; the contract rejects a report that still counts it. COLLECTORS lists every collector; each needs counter-cases, run by every_collector_has_counter_cases. First module: SEO (meta, headings, social, technical, structured data, image efficiency, page-health DOM and HTTP probes). Failed probes no longer report http1_only, missing_compression, www_not_consolidated or http_not_redirected_to_https.
…777) Cookie inventory, broken links, service workers, web manifest, www redirect, robots.txt, sitemap noindex and visible schema facts record their state. Unanswered link requests are no broken links, a failed manifest request is no invalid manifest, an unread cookie jar is not 'no cookies', an unreachable robots.txt is unknown rather than missing. Derived indicators are skipped over a failed upstream module and partial over a partial one; AI visibility leaves crawler signals out while robots.txt is unknown.
Print and forced-colors detection, layout under emulation, contrast and link-indistinct snapshots record their state. A detection without an answer fails the analysis instead of reading as 'no print stylesheet' or 'no contrast failures'; without media emulation the print and focus layout risks are not claimed, and the score is marked partial.
… the contract (#777) Console and library collection record their state; a console collector that was never installed or a malformed message list is no clean console, a malformed library list no page without libraries. The console collector is installed whenever best practices run, so security-only audits read the console too. A module whose every collection failed is Failed even with a default payload.
A detection script without an answer fails the module instead of reporting no stack. A stack counts as audited only when one of its hardening probes answered; unanswered probes make the collection partial or failed, and a page without an auditable stack is not applicable.
… collectors on the contract (#777) The SSR content-gap check loads the page itself with and without JavaScript instead of measuring whatever the tab shows (about:blank after interactive journeys), and a missing length is no measurement. Help mechanisms, easy-language markers and display modes record their state in a page-level log folded into the accessibility run.
Text spacing, reflow, page title, on-input and orientation report a technical rule failure when the page gives no answer instead of passing; an explicit null still means nothing found. The form-error and add-to-cart journeys fail when a probe gives no answer instead of reporting a missing live region or dialog.
This was referenced Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Package 2, part 1: the shared collection contract (#777) and its use in every module outside performance, security/DNS and C2PA. Those three follow as separate PRs (#769/#770, #774–#776, #789).
Contract
audit::collection:Collected<T>with the states measured, empty, partial, failed, unsupported and not_applicable. JS, CDP, HTTP and DNS adapters produce it, never a default value.CollectionLogrecords each collection for the page.COLLECTORSis the inventory.module_runs[].subchecks[]carriesstate,method,method_version,reason_code,scoringandgaps. The schemas now describemoduleRun/subcheckRun, andmeasurement_typenow allowspartialandnot_measured(performance already emitted them).partialand leaves the overall score, in both the module scores and the per-viewport blend.Failed.Skippedover a failed upstream module andPartialover a partial one.Completed(collection_gap_completed), and a score built on a lost collection that is still counted (collection_gap_scored).every_collector_has_counter_cases:COLLECTORSentry needs counter-cases. The JS contract (missing result, invalid JSON, scalar, wrong shape, valid empty) and domain cases are run.Collectors migrated
Behaviour fixes this exposes
http1_only,missing_compression,www_not_consolidated,http_not_redirected_to_https,pwa_invalid_manifest, broken links,NoPrintStylesheet/NoForcedColorsSupport, print and focus layout risks without emulation, "no live region".about:blank.null("nothing found") from no answer by the RemoteObject subtype.Validation (local, all green)
cargo fmt --checkpasses, andclippy -D warningsis clean with all features and with no default features.cargo test --all-featurespasses.integration_test42/42,detection_corpus_test,schema_rules_detection_corpus_test,vulnerable_libs_detection_corpus_test,easy_language_detection_test,help_mechanisms_detection_test,score_calibration_test.reference_sites_testshows no deviation from the reviewed bands.#777 stays open. Its inventory is complete only once the performance, security/DNS and C2PA collectors and the remaining infrastructure probes (navigation snapshot, frames, consent, interaction) are in.