Repository navigation
Conversation
Apply the screen/light/1280x800 policy approved in pbakaus#988 before the static cascade and CSS checks. Add regressions and review the intended CLI golden changes without changing frozen vectors. AI assistance: Prepared with OpenAI Codex under Mager's direction.
Retain media filtering in both cascade and pattern CSS corpora. Cover inactive media and ignored linked sheets together. AI assistance: prepared with OpenAI Codex under Mager direction.
Give each helper call a unique directory so parallel tests cannot remove each other files. AI assistance: prepared with OpenAI Codex under Mager direction.
Compare the five aggregate cases against fresh main and branch binaries. Retain all upstream findings and the four expected media fixture findings. AI assistance: prepared and validated with OpenAI Codex under Mager's direction.
Resolve the append-only DELTAS.md conflict without changing the static media implementation or its goldens. Release build and oracle replay pass. AI assistance: prepared and checked with OpenAI Codex under Mager's direction.
|
This PR is too large for Bugbot to review. It changes 690 lines and 3,992,095 characters. Split the change into smaller pull requests to get a review. |
[Medium impact] The PR appears safe to merge; no new actionable issue was found. SummaryStatic HTML scans now use one screen environment: light colors at 1280 × 800.
The previous-review merge-base check failed, so this review used the full PR diff. No runtime tests were run during this review.
|
Preserve valid negative width and height comparisons. Filter each stylesheet once before sharing it with the cascade and pattern scan, with regression coverage for sheet boundaries and browser-matched fixtures. AI assistance: implemented and tested with Codex.
Preserve current main findings and both review fixes. Review refreshed aggregate and inactive-media fixture goldens against fresh main and PR builds. AI assistance: conflict resolution and verification performed with Codex under Mager's direction.
|
Merged current main ( Both review fixes are preserved. The conflicts were in aggregate oracle results and their notes. I compared fresh main and PR builds before updating them: only the intended media-filter findings change, with all 190 advisories unchanged. The newly merged inactive-at-rule fixture now expects active cyan candidates instead of magenta candidates behind The test plan is updated. All 233 HTML tests pass, the seven changed oracle reports match exactly, and static/Chromium checks of both PR fixtures each produce four contrast findings. Full-run limits are recorded too: two local Rust failures (the hook test passes alone) and six Live failures, all six reproduced on fresh main. No assertions or timeouts were weakened. AI assistance: Codex performed the merge, verification, and this update under Mager's direction. |
AI assistance: Codex reproduced the review finding and added the fix and regression tests under Mager’s direction.
Preserve independent media fixtures after contrast pair deduplication. Review refreshed aggregate oracle reports against fresh main and merged engines; retain upstream accepted deltas. AI assistance: prepared and tested with OpenAI Codex under Mager's direction.
|
Merged current main ( Main's new contrast-pair deduplication exposed a fixture problem: four media cases shared one ink and collapsed into one finding. Each flag/pass case now has its own ink, so the tests still verify four independent active cases and five inactive controls. No production source change was needed for this merge. Verification and the PR test plan are updated:
Linux Rust, Node 22/24, oracle, launcher, CLI shim, and Greptile CI pass. Windows Rust is still running its test step. The PR remains ready for review, with that CI result still to check before merge. AI assistance: prepared, tested, and posted with OpenAI Codex under Mager's direction. |
Static HTML scans currently combine declarations from mutually exclusive media queries. In #988, dark-mode text variables and a print-only white background produce a contrast error for a combination that the default browser scan never renders.
This applies Paul's approved policy: one screen environment, light color scheme, and the default 1280 × 800 viewport. Inactive and unsupported conditions are excluded before the cascade, custom-property resolution, keyframes, and CSS pattern checks. This covers nested
@mediablocks andmediaattributes on inline/local linked stylesheets.Supports media types, negation, query lists, grouped conditions, light/dark scheme, orientation, and width/height conditions including ranges and px/em/rem units. Unknown conditions remain unknown under negation. CSS token parsing preserves strings, comments, offsets, and line breaks.
Closes #988.
Review fixes
Both findings are addressed in
d520c6d145923125e97eb88cab91e6453b4e5da5:(width > -1px)andnot (max-width: -1px)now retain active styles and their contrast findings.Main
5cb95eea9was merged without rewriting history before these fixes. Current main7510e233bis now merged without rewriting history in8d53475c8; see the current verification below.Test plan
Current merge verification (
8d53475c8, 2026-10-28)7510e233bwithout rewriting history. Resolve the delta-note conflict and five aggregate golden conflicts; production source merges cleanly.static-media-environment.htmlandnegative-media-dimensions.htmleach report exactly four low-contrast findings and exit 2.bun run buildand the default core suite pass (485 Bun tests + 234 Node tests, 2 skips).CARGO_INCREMENTAL=0 CARGO_PROFILE_TEST_DEBUG=0 RUST_TEST_THREADS=2 bun run test:rust-changed --base 7510e233b: 1,368 pass, 1 fail. The sole failure is the previously documentedartifact_cleanup_failure_blocks_the_gate(stale evidence: regions/retired.png); its source and test are unchanged from current main. The original run is not counted as green.live-agent-target.test.mjslease/timing group: holder becomes busy, denied-claimant pending verdict, disconnected-holder lease, all-idle-pages decline, and last-silent-overlay disconnect. No assertion or timeout was relaxed. A fresh current-main-runtime default run also reports 255 pass, 5 fail, 2 skip in this group; four failure names match. The fifth differs (denied-claimant verdict here, generate-already-answered on main), so this is evidence of the existing timing instability, not an exact match of every failure. The denied-claimant test passes in isolation on both fresh main and PR binaries (1/1 each); the failed full run remains recorded.Boolean-feature review fix (
595346e00)Bare
(orientation)and(prefers-color-scheme)now evaluate as true in the supported screen environment, as required by Media Queries boolean context. Previously, those valid conditions were treated as unknown and their active styles were removed.(orientation).screen, negated controls, and an unsupported feature under both positive and negative forms.bun run test:rust-changedcompleted with 1,320 pass and 4 fail: three browser shadow-tree tests lost their browser connection, and the previously documentedartifact_cleanup_failure_blocks_the_gatefailed. These are outside the two files changed in this review fix. All six shadow-tree tests pass on a serial rerun. The initial run is not counted as green.595346e00passes all selected checks, including Rust on Linux/Windows, Node 22/24, oracle, Windows launcher, and CLI shim. Greptile review passes. Earlier browser checks and timing measurements below retain their original commit labels.Earlier merge verification (
06948f3ee, 2026-10-24)Verification uses fresh release builds from main
936867543and the merged PR, not the downloaded engine.min-width: 4000pxare excluded, and active cyan candidates are reported. Its existing Rust oracle regression failed before the golden correction. Seven direct oracle checks (the five aggregate reports plus this fixture's two reports) now match exactly, without accepted-delta exemptions.cargo build --release -p impeccableandbun run buildpass.static-media-environment.htmlandnegative-media-dimensions.htmleach report exactly four low-contrast findings and exit 2.cargo test --workspace --no-fail-fast: 2,368 pass, 2 fail, 9 ignored. Failures: the previously reproducedartifact_cleanup_failure_blocks_the_gate(stale evidence: regions/retired.png) anddisabled_project_or_environment_blocks_user_hooks(local config re-enables hooks). The hook test passes on an isolated rerun. Both crates and their tests are byte-identical to current main. This is not a green full local workspace run.tests/live-agent-target.test.mjs(33 pass, 7 fail in that group). No Live tests, assertions, or timeouts were changed. The full local default run is not green.Earlier review-fix verification (
d520c6d14)These results describe the previous revision; the current merge checks are above.
cargo test -p impeccable-html: all 232 tests pass, including active/inactive negative ranges, min/max, negation, px/em/rem, unsupported-unit controls, and the existing media/ignored-linked-sheet regression.cargo build --release -p impeccableandbun run buildpass.static-media-environment.htmlandnegative-media-dimensions.htmleach report exactly four low-contrast findings and exit 2.negative-media-dimensions.htmlfixture has four flag cases and five pass controls. Rebuilt static and real Chromium scans both report exactly four low-contrast findings and exit 2. Browser selectors are only#flag-range-width > p,#flag-negated-width > p,#flag-range-height > p, and#flag-chained-width > p.ec80ea6b9binary on the identical fixture tree, the five aggregate cases gain only the four new fixture findings, in the expected order: non-advisory count 1,028 → 1,032, all 178 advisories unchanged, exit 2. JSON and text differences were reviewed by hand and recorded intests/oracle/DELTAS.md. Frozen function vectors are unchanged.cargo test --workspace --no-fail-fast: 2,257 pass, 1 fail, 9 ignored. The sole failure isimpeccable-comp-verbs::build_phase::integrity_tests::artifact_cleanup_failure_blocks_the_gate(stale evidence: regions/retired.png). The same exact failure was reproduced on a fresh build of unchanged main490141501; that test and its implementation were not changed by this PR. This is not a green full local workspace run.IMPECCABLE_BIN="$PWD/target/release/impeccable" bun run test: Live stage has 230 pass, 6 fail, 2 skip. All six failures are in the unchangedtests/live-agent-target.test.mjslease/timing group, and all six were also present in the sequential fresh-main490141501baseline (33 pass / 7 fail). No assertions or timeouts were relaxed. This is not a green full local default run.d520c6d14passed all selected checks, including Linux/Windows Rust, Node 22/24, and oracle. Greptile confirmed both review findings fixed (5/5); both threads are resolved.Cold edit-hook timing
Measured sequentially after local builds and tests finished, using release
rule_costbinaries on macOS/aarch64. Each version uses the same frozen 347-input corpus: anti-pattern fixtures from main5cb95eea9plus magerblogsrc/ateb21cd8ef586289db11f201423b103883ec0b798. There are 196 static HTML and 151 text inputs, with nine cold processes per file (1,764 HTML and 1,359 text samples per version). The new regression fixture is excluded from this frozen corpus.5cb95eea9ec80ea6b9d520c6d14The fixed static mean is +0.016 ms (+0.18%) versus main and -0.019 ms (-0.21%) versus the pre-fix PR. This whole-tree measurement includes run-to-run noise and does not establish a measurable speedup. The repeated media passes are removed in code; the scan still spends most time elsewhere.
Repeat with
cargo build --release -p impeccable-html --example rule_cost, thentarget/release/examples/rule_cost --runs 9 --out rule-cost.json <same-frozen-fixtures> <same-frozen-project-src>for each version.Repeat the visible check
cargo build --release -p impeccable target/release/impeccable detect --no-config --json tests/fixtures/antipatterns/negative-media-dimensions.html target/release/impeccable detect --no-config --json "file://$PWD/tests/fixtures/antipatterns/negative-media-dimensions.html"Both scans should report the four active cases and exit 2. Open that HTML file at 1280 × 800/light to inspect the flag/pass columns. The original
static-media-environment.htmlfixture can be checked the same way; it also reports four findings in both paths.The original #988 reproducer and an explicit screen/dark-versus-print example previously produced zero contrast findings in both static and rendered scans. An unconditional contrast failure remained detectable in both. The original page's separate cream-palette warning remains; this change addresses its false contrast finding.
Scope and limits
This is a single-environment static scan, not coverage of every responsive state. Unsupported features, including
prefers-reduced-motion, are excluded. This intentionally removes the static.rec-markfinding from the existing pulsing-dot fixture; the rendered scanner is unchanged. The other existing fixture change removes a gradient contrast finding under(max-width: 1px).Plain CSS/JS text scans,
@supportsevaluation, and layer behavior are unchanged. No shared detection rule or browser bundle changes. Generated provider output is intentionally omitted; no version or changelog changes.AI assistance: implementation, tests, review replies, and this PR description were prepared with OpenAI Codex under Mager's direction, following the maintainer-approved scope above.