feat: add deterministic visual-change detection for PRs. - #7742
Draft
BillLeoutsakosvl346 wants to merge 13 commits into
Draft
feat: add deterministic visual-change detection for PRs.#7742BillLeoutsakosvl346 wants to merge 13 commits into
BillLeoutsakosvl346 wants to merge 13 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 a deterministic, artifact-only visual-change analyzer for staging PRs across product, landing pages, emails, docs, desktop, shared components, themes and assets. It reads immutable Git objects and compares the merge-base with the PR head. Decisions remain
flagorexempt; unresolved effects flag only when changed source has presentation evidence or a traceable rendering input. Completed analyses exit 0; operational failures exit nonzero withflagged: null.Schema 3.0.0, engine 0.3.0, policy 3.0.0 replace the earlier draft report. Findings stay grouped by changed source with locations, direct changes, a representative consumer and partial usage counts. Full semantic hashes determine differences before 4 KiB previews and deterministic list sampling; serialized reports are capped at 5 MiB with truncation metadata.
This revision removes module-wide dependency taint, narrows each helper hop and known environment keys, avoids repeated consumer expansion after changed-source evidence is established, distinguishes SQL/telemetry bindings from actual DOM/canvas rendering, traces selected imports/properties/helper returns and supported equivalent refactors, traces rendered React state setter inputs, follows configured Fumadocs OpenAPI file inputs, and compares rendering dependency closures instead of every lockfile edit. The same conservative movement policy remains in place.
The advisory production workflow runs trusted default-branch engine/configuration/dependencies with read-only permissions. It retains only a JSON artifact identified by PR/head for seven days. It becomes operational after reaching
main. Its absence here and the earlier schema-2 smoke run do not validate this revised engine. No comments, labels, annotations, required-check registration, Slack, screenshots or AI stages are added.See
scripts/design-diff/README.mdand the frozen manifest atscripts/design-diff/benchmark/comparisons.jsonfor supported conventions, limits and reproduction commands. Schema-2 readers must handle schema-3 value summaries and omitted-detail counts.Type of Change
Testing
git diff --checkpass locally. Trusted dependencies were installed from the frozen lockfile with lifecycle scripts disabled.8697761f84762a2550e2b4318a84a805bda773bd: https://github.com/simstudioai/sim/actions/runs/34577479566. Baseline remains 108/120 flagged, including 39/49 manually nonvisual cases. Final measured results pending; incomplete prior replays are excluded. The research replay uses a recorded 1,800-second deadline; production remains 15 minutes, and comparisons exceeding that budget will be reported separately.8697761f84762a2550e2b4318a84a805bda773bd.Remaining limitations: source labels are not rendered pixel ground truth. Arbitrary runtime behavior, broad authentication/data factories, unresolved conditions and unsupported drawing/plugin mechanisms can still overflag or escape precise tracing. Arbitrary event reachability, reducer/effect scheduling, async rejection effects and dynamic/generated inputs outside configured conventions are not fully modeled. Usage counts are partial references, not a claim that every instance changes visually.
Checklist
Screenshots/Videos
Source-analysis automation; screenshot capture is a later stage.