Pixel diff finds every changed region, and qwen4-max checks each one against a compliance checklist and assigns a severity for a release verdict.
A routine style change can hide a risk disclosure, move the decimal point in a performance benchmark, or shrink agreement text until it is unreadable. Code review rarely catches these issues, and manual page-by-page checks do not scale. This playbook screenshots the page before and after a change, uses a pixel diff to find every changed region, then asks qwen4-max to check each region against a compliance checklist and assign a severity. The result is a single release verdict. The walkthrough uses a fictional wealth management product page on mobile; the same method applies to release checks for banking, insurance, and securities app pages, as well as e-commerce campaign pages.
Call chain: prepare the correct page → inject 3 issues → screenshot both versions → pixel diff and box every changed region → qwen4-max checks each region against the compliance checklist and assigns a severity → release verdict. Toolchain: Playwright (screenshots), Pillow (pixel diff); the model is called once, only for judgment.
All three injected issues were detected and graded: the hidden risk disclosure and the inflated benchmark were rated P0 (high risk, block release), and the undersized agreement text was rated P1 (readability issue, fix and recheck). The unchanged control region was rated none, confirming it matched the original.
Full-page diff overlay: blue boxes mark the three issue regions; yellow boxes mark regions whose content did not change but whose position moved.
The correct page is a fictional wealth management product detail page (390px mobile width) with all 8 compliance elements: risk disclosure clearly readable, benchmark number accurate, product term clear, starting amount clear, risk level clear, investor suitability clear, agreement text clearly readable, and registration and custody info prominent. Each element has a fixed ID so it can be captured by region; the page footer carries a synthetic-material notice.
Demo page HTML (input)
A script makes three exact replacements on the correct page to simulate a problematic redesign. Each replacement first verifies that the original string appears exactly once on the page, so nothing else is changed by accident. The script writes an
Playwright opens both pages at 390px mobile width and 2x scale. It captures one full-page screenshot per version, then a close-up per issue element and per unchanged control region, recording the position of each for later reconciliation. When the page is taller than the viewport, scrolling can shift the recorded positions, so the script expands the viewport to the full page height before recording.
The diff works in two layers. First, it boxes every changed block on the full-page screenshot and checks whether all three issues are inside a box. Then it computes the changed-pixel ratio per region, counting a change only when a color difference exceeds the allowed tolerance to filter rendering noise.
The full page yields many changed blocks, and all three issues are boxed (3/3). Most of the remaining blocks are not actual content changes: shrinking the agreement font makes the card shorter, so the custody info and footer move up. The verdict below is from the measured run; the screenshots on this page are an English-localized rendering of the same before/after states. Pixel diff answers "where may something have changed" and deliberately over-boxes rather than missing a change. The model's next step distinguishes "just moved" from "actually violating," which avoids flooding reviewers with false alarms.
Send the four before/after region pairs and the compliance checklist in one request to qwen4-max, with images embedded directly in the request. Require a fixed table per region: changed or not, what changed, whether it is a violation, and severity (P0 = high risk, must block; P1 = readability issue, fix; P2 = minor; none = no issue). Do not allow free-form output.
Before and after comparison
Region comparison (for locating each issue)
Key settings: model
A script reconciles the model's region verdicts with the injection record: any version with a P0 blocks release, P1 requires a fix and recheck, and everything else is released. For I2, the model pinpoints the violation: "the annualized performance benchmark changed from 2.85% to 28.5%, with the decimal point moved one place right and the value inflated 10 times." For I1, it notes that the disclosure "disappeared entirely and the region became blank, with no text or placeholder."
In production, run this chain as an automated pre-release check: screenshot the page, diff, judge, and reconcile, then attach the report to the release ticket.
Disclaimer: The content shown on this page is all generated by AI models and is for reference only; it does not constitute any guarantee of results. The product page, institution names, registration numbers, and rate data are synthetic demo material and do not refer to any real product. The three issue changes were deliberately injected for demonstration. Actual output and Credits consumption are subject to "Usage Details" in the console.
Actual output
Input material and script source: see steps 1–5.
| Region | Injected issue | Model severity | Expected severity | Result |
|---|---|---|---|---|
| I1 Risk disclosure | Text color changed to pure white, same as the white background (visually hidden) | P0 | P0 | Match |
| I2 Benchmark | 2.85% changed to 28.5% (decimal point moved right) | P0 | P0 | Match |
| I3 Agreement text | Font size reduced from 13px to 7px (unreadable) | P1 | P1 | Match |
| Control region (term/starting amount/risk level/investor suitability) | No change | none | No issue | Zero false positives |

Procedure
Step 1: Prepare the correct page and the compliance checklist
The correct page is a fictional wealth management product detail page (390px mobile width) with all 8 compliance elements: risk disclosure clearly readable, benchmark number accurate, product term clear, starting amount clear, risk level clear, investor suitability clear, agreement text clearly readable, and registration and custody info prominent. Each element has a fixed ID so it can be captured by region; the page footer carries a synthetic-material notice.
The demo page source is a single-file HTML with Chinese demo copy; replace the copy for localized pages.
Step 2: Inject three issues
A script makes three exact replacements on the correct page to simulate a problematic redesign. Each replacement first verifies that the original string appears exactly once on the page, so nothing else is changed by accident. The script writes an injection_log.json issue record for later reconciliation.
Injection script
| ID | Element | Injection | Expected violation |
|---|---|---|---|
| I1 | Element 1: risk disclosure visibility | Body color changed to #ffffff (same as the white card) | Risk disclosure visually hidden, P0 |
| I2 | Element 2: rate accuracy | 2.85 replaced with 28.5 | Benchmark inflated about 10x, P0 |
| I3 | Element 7: agreement readability | Agreement font size changed from 13px to 7px | Agreement text unreadable, P1 |
Step 3: Screenshot both versions
Playwright opens both pages at 390px mobile width and 2x scale. It captures one full-page screenshot per version, then a close-up per issue element and per unchanged control region, recording the position of each for later reconciliation. When the page is taller than the viewport, scrolling can shift the recorded positions, so the script expands the viewport to the full page height before recording.
Step 4: Pixel diff to find changed regions
The diff works in two layers. First, it boxes every changed block on the full-page screenshot and checks whether all three issues are inside a box. Then it computes the changed-pixel ratio per region, counting a change only when a color difference exceeds the allowed tolerance to filter rendering noise.
| Region | Changed pixel ratio | Note |
|---|---|---|
| I1 Risk disclosure | 12.21% | The disclosure text changes from gray to white |
| I2 Benchmark | 3.05% | Only the number changes; the small region is still boxed |
| I3 Agreement text | 12.62% | Smaller font compresses the agreement row |
| Control region | 0.00% | Pixel-identical in both versions |
Step 5: Model checks each region for violations
Send the four before/after region pairs and the compliance checklist in one request to qwen4-max, with images embedded directly in the request. Require a fixed table per region: changed or not, what changed, whether it is a violation, and severity (P0 = high risk, must block; P1 = readability issue, fix; P2 = minor; none = no issue). Do not allow free-form output.
Before and after comparison
Before (correct): all 8 compliance elements present ![]() | After (issue version): risk disclosure hidden, benchmark inflated, agreement text shrunk ![]() |
I1 risk disclosure (before) ![]() | I1 risk disclosure (after: hidden) ![]() |
I2 performance benchmark (before) ![]() | I2 performance benchmark (after: 28.5%) ![]() |
I3 agreement text (before) ![]() | I3 agreement text (after: 7px) ![]() |
Control region (before) ![]() | Control region (after: no change) ![]() |
qwen4-max · fixed-format verdict table · output limit 3000 (the model's reasoning also counts) · four region pairs and the checklist in one request.
Reserve enough output length. The model's reasoning counts toward the output limit; too small a limit truncates the verdict.
Step 6: Produce the release verdict
A script reconciles the model's region verdicts with the injection record: any version with a P0 blocks release, P1 requires a fix and recheck, and everything else is released. For I2, the model pinpoints the violation: "the annualized performance benchmark changed from 2.85% to 28.5%, with the decimal point moved one place right and the value inflated 10 times." For I1, it notes that the disclosure "disappeared entirely and the region became blank, with no text or placeholder."
In production, run this chain as an automated pre-release check: screenshot the page, diff, judge, and reconcile, then attach the report to the release ticket.
Notes
- Coverage boundary: This chain checks only the rendered appearance of a page. Effects after button clicks, content that loads later, and differences across device models are out of scope. Formal release decisions should still follow the institution's own compliance review process; use this playbook as an auxiliary acceptance tool.
- Replaceable checklist: The 8 items here are a demo standard. For real work, rewrite them according to the institution's current compliance rules; the model judges against the checklist you provide.
- Material notice: The product page, institution names, registration numbers, and rate data are synthetic demo material; the three issues were deliberately injected for demonstration.









