fix: send the fidelity report when it disagrees with the grade above it - #12
Merged
Conversation
Keying it on quality.projection hid a real defect. projection_quality is computed from diagnostics alone, so a coverage shortfall that raises no diagnostic leaves the grade reading exact - and the condition then took the report away with it. Measured on a real 50-node screen (3997:47884): fidelity.variables was 19 of 20 while quality.projection read exact. The missing one is a \\\ binding on an ellipse whose parent is exported as an SVG, so the theme colour is baked into the file and can never follow the theme. Three play buttons on that screen are affected. Before this change the response showed the shortfall; after the first attempt it hid it. The condition is now strict_compatible, the same predicate \strict: true\ refuses on, so the two cannot disagree about whether anything was lost. On the ten real captured screens it stays silent for every screen with neither a shortfall nor an approximation, which is what this is for.
Contributor
Changepacksdevup-mcp@0.2.1 → 0.3.0 - crates/devup-mcp/Cargo.tomlMinor
Patch
devup-mcp-devup-ui@0.2.1 → 0.3.0 - crates/devup-mcp-devup-ui/Cargo.tomlMinor
Patch
devup-mcp-figma@0.2.1 → 0.3.0 - crates/devup-mcp-figma/Cargo.tomlMinor
Patch
devup-mcp-visual@0.2.1 → 0.2.2 - crates/devup-mcp-visual/Cargo.tomlPatch
|
…ur asset An asset drawn in one colour becomes a Box masked to its shape with \�g\ set from that colour, so a token binding inside it survives as a token. An asset drawn in more than one has no such form: a CSS mask carries alpha only, and an SVG loaded through \<img src>\ renders in its own document, where neither currentColor nor a CSS variable reaches it. It becomes an \<Image>\ and every colour inside is baked into the file. Counting those bindings as expected-but-missing asks the generator for something no correct implementation could produce. On frame 3997:47884 two play buttons each hide a bound circle behind a white glyph, and that alone put the whole fidelity report on the response with nothing in it anyone could act on: variables read 19 of 20 and the report was sent. Bindings inside a non-mask asset are now left out of the expectation. That screen moves to 17 of 17 and the report is not sent. Across the ten captured screens the expectation drops from 658 to 528 and is fully covered - while six of the ten still send the report for their absolute-layout approximations, so this narrows what is expected rather than silencing what was found.
build.rs infers the build id from git HEAD plus whether the tree is dirty, and on a release build the tree always is: \changepacks update\ moves the version in Cargo.toml and leaves Cargo.lock behind, so the first cargo invocation rewrites the lock and dirties the checkout. Every published binary therefore reported \<sha>-dirty\ - precisely the state \--version\ and \--self-check\ exist to tell apart from a developer's working tree. Committing the lock fixed the instance; PR #11 bumps Cargo.toml to 0.3.0 without touching the lock, which brings it straight back. CI knows which commit it is building, so it says so. build.rs already prefers DEVUP_MCP_BUILD_ID over its own inference. A local build still infers, so a dirty working tree still reports itself as one.
Both sides changed validate_fidelity: #9 counts a declared child that no asset represents against node coverage, this branch stops counting a variable binding that a multi-colour asset baked into a file. They are the same rule read from two directions - expect what the generator could have produced, and nothing else - so the merge keeps both. Verified on the merged tree: fmt, clippy -D warnings, the whole suite and insta.
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.
Found by running the merged build against a real frame (
3997:47884) and comparing with the previous release.quality.projectionis computed from diagnostics alone, so a coverage shortfall that raises no diagnostic leaves it readingexact. Keyingfidelityon that grade therefore hid the shortfall it was supposed to explain.Measured on that screen:
fidelity.variablesis 19/20 whilequality.projectionsaysexact. The missing binding is\on an ellipse (3997:47917) whose parent (3997:47916) is exported as an SVG - so the theme colour is baked into the file and can never follow the theme. Three play buttons on that screen are affected.Before: the response showed
19/20. After the first attempt: hidden. Now: shown again, while a cleancompletenessReportstays hidden.The condition is now
strict_compatible, the same predicatestrict: truerefuses on, so the two cannot disagree about whether anything was lost.