feat: add deterministic visual-change detection for PRs. - #7742
Draft
BillLeoutsakosvl346 wants to merge 15 commits into
Draft
feat: add deterministic visual-change detection for PRs.#7742BillLeoutsakosvl346 wants to merge 15 commits into
BillLeoutsakosvl346 wants to merge 15 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
added 7 commits
September 10, 2026 21:27
…bility resolution
…engine # Conflicts: # package.json # scripts/check-script-test-coverage.ts # vitest.scripts.config.ts
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.
Summary
Add deterministic visual-change qualification for staging PRs across product, landing pages, emails, documentation, desktop, shared components, themes and assets. The engine reads immutable Git objects and compares merge-base to head. Decisions remain
flag/exempt; incomplete static evidence flags when a changed input is connected to rendering. Completed analyses exit 0; operational failures exit nonzero withflagged: null.Schema 3.0.0, engine 0.3.0, policy 3.0.0 replace schema 2. Findings group changed sources, retain locations and representative consumers, and mark usage counts as partial. Full semantic hashes are compared before 4 KiB value previews and deterministic sampling within a 5 MiB report cap.
The resolver narrows imports, selected properties, environment fields and supported helper returns; distinguishes SQL/telemetry from rendering; handles supported equivalent refactors; traces rendered state setters and captured title maps; reads configured Fumadocs OpenAPI inputs; and compares rendering dependency closures instead of every lockfile edit. All in-scope changed files are analyzed. After qualification and a nearby unchanged rendering-consumer examination, additional unchanged consumers may be omitted with an explicit coverage limitation. This is a PR qualifier, not an exhaustive inventory of indirect effects.
The advisory production workflow uses trusted default-branch engine/configuration, pinned tooling and read-only permissions, and uploads only a JSON artifact with seven-day retention. Activation requires reaching
main; this draft PR does not activate the production trigger. No application code/plugins execute during analysis. No PR findings comments, labels, annotations, required-check registration, Slack, screenshot or AI stages are added.See
scripts/design-diff/README.mdand the committed frozen manifest/replay tooling underscripts/design-diff/benchmark/.Type of Change
Testing
c8d1bf882d9fbfc73adfb7eb71d1cd46b3e2b286. The formerly missed tool-progress changes feat(browser): add verified form filling and horizontal scroll #7556 and feat(desktop): improve semantic browser tool reliability #7494 now flag with progress-title UI evidence. Repeated feat(browser): add verified form filling and horizontal scroll #7556 reports are byte-identical locally and match the cloud report byte-for-byte.On the same 117 completed original comparisons, qualification falls from 105/117 to 79/117; on the same 47 completed nonvisual cases, flags fall from 37/47 to 11/47.
Original frozen labels contain 60 clearly visual/content cases, 49 nonvisual and 11 uncertain; holdout contains 37, 18 and 5. Holdout labels were frozen before results, but some cases were subsequently used during debugging, so this is not a wholly blind evaluation. Documentation and visible copy are in scope; clear visual cases alone make up 50% of the original sample.
original: possible full-cohort qualification range 65.83–68.33%; failures are neither clean nor confirmed flags.
holdout: possible full-cohort qualification range 68.33–70.0%; failures are neither clean nor confirmed flags.
Acceptance remains incomplete. Operational failures: #6593 (Analysis deadline exceeded), #7277 (Analysis deadline exceeded), #7625 (Analysis deadline exceeded), #6901 (Analysis deadline exceeded). Clear completed cases without sufficiently precise reviewed presentation evidence: #7686, #7452.
Manually reviewed relevant presentation evidence is established for 93/97 received clear visual cases. Every frozen-label disagreement is reviewed. #7573 is a documented label correction: MIME normalization changes file-picker disabled states; it stays in the primary frozen-nonvisual count rather than silently improving the rate.
Remaining apparent false positives include broad authentication/environment/provider records and complex refactors (#7037, #7207). Arbitrary runtime behavior, opaque factories, dynamic inputs and event/effect scheduling are not fully modeled. Evidence is not proof of changed pixels; partial usage counts are not counts of visually changed instances.
Metrics cover completed analyses; timeout peak RSS is unavailable. Each CLI comparison has a 900-second analysis deadline. Batched research jobs have a 45-minute outer deadline for six comparisons; production remains a 15-minute complete job including setup, whose reliability is not established by this benchmark. Every completed report stays below 5 MiB.
Final cloud measurement wall time was 57m 05s, including queue/setup gaps; prior tuning runs are excluded. The last 84 comparisons took 22m 23s after batching.
Latest engine-head PR CI: 14 passing, 25 skipped, none failing or pending when checked. CI success does not override benchmark failures or activate the production workflow.
Checklist
Screenshots/Videos
Source-analysis automation; screenshots are a later stage.