Skip to content

feat(audit): expected outcomes per rule and viewport for tree, page and inline rules (#778) - #814

Merged
casoon merged 3 commits into
mainfrom
claude/778-rule-outcomes-b3c66a
Oct 31, 2026
Merged

casoon merged 3 commits into
mainfrom
claude/778-rule-outcomes-b3c66a

Conversation

@casoon

@casoon casoon commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Part of #778 (does not close it).

What

  • audit_scope.requested_rules now lists every rule the run must account for with its viewports — shared, AX-tree (new engine::TREE_RULES table, the engine runs exactly it), page (PAGE_RULES executor and concrete ids) and inline rules (reflow, HTML content model; mobile only). The set is derived in wcag::expectation from the registrations, level and [rules] filter — no second list. audit_scope.wcag_level is new. Breaking vs. the unreleased 2.0 foundation: sample scope, coverage, session policy, snapshot fingerprint (#791 #778 #787 #790) #813 shape: requested_rules entries are {rule_id, viewports} objects, not strings.
  • Validation: requested_rule_outcome (missing per viewport), rule_outcome_duplicate, rule_outcome_above_level.
  • Counting unit: a page-rule executor and its concrete rules are one check (expectation::check_unit/count_checks) for failed_rule_checks, missing_capabilities and incomplete.
  • Fixes found by a live Chrome run: context/on-input (static + live half) and the "not yet adopted" placeholders produced two outcomes per viewport; they now fold into one (WcagResults::fold_outcome, also used for frames). A requested html-conform check whose collection delivered nothing is an errored outcome, not a gap.
  • Docs: schema, OUTPUT_CONTRACT, ARCHITECTURE, changelog.

Verified

cargo test (incl. rule_contract_gate, coverage_matrix, architecture ratchet), cargo clippy --all-features --all-targets -- -D warnings, cargo check --all-features; live --full audit of a local page passes validation (172 requested rules, 366 outcomes, no duplicates).

Still open in #778

  • Frame pass: frames fold into page outcomes, but there is no per-frame outcome record (a frame whose rule errored only qualifies via the existing uninspected-frame path / folded errored status).
  • Non-rule subchecks and State axes of the "per module, rule, subcheck, viewport and state" matrix (journeys, states from [2.0][U22] Interaktion und Sessionzustand sind kein abgeschlossener Messvertrag #787).
  • Rule filter is not recorded in the scope, so a ran outcome for a filtered-out tree/page rule is not detected.
  • Release CI/acceptance of the issue's remaining checkboxes.

@casoon
casoon merged commit 0a83dcb into main Oct 31, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant