Stop testing skills from prompting unit tests for static styling - #182
Draft
georgewrmarshall wants to merge 5 commits into
Draft
georgewrmarshall wants to merge 5 commits into
georgewrmarshall wants to merge 5 commits into
Conversation
Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
This branch has not been deployed
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.
Description
Agents working on designer PRs keep adding unit tests for static styling changes. Those tests check padding values, fixed truncation props, or Tailwind margins. They don't guard behavior, and they break whenever a design token changes. Examples: metamask-mobile#36801, #36852, #36855.
The skills are the cause. The mobile
unit.mdsays "EVERY component MUST test… all code paths" and tells agents to addtestIDs whenever they update code. The extension coding guidelines say "ALWAYS write tests for new code." Neither layer policy says to skip static presentation.Changes:
testing-layers.md,extension-testing-layers.md): new "Not worth covering: static presentation" section. Spacing, color, typography, and fixed layout props are GAP / ACCEPT. The section also covers:testIDadded only to readstyleorclassName.unit.md:testIDrule.unit.md: the same skip section, plus no snapshots added or refreshed for class-name-only diffs.The generated
perps-review-prcriteria are not hand-edited. Its line about asserting "size or color" claims should be revisited upstream.Type of Change
Skill Details (if adding a new skill)
Provider Name: N/A
Skill Name: N/A
Brief Description: N/A
Checklist
Testing
node --test test/*.test.mjs: 72/72 pass.yarn lint:changelog: passes.node .github/scripts/lint-skill-entry.mjs: 1 error, thetypescript/tsc-blindspotsdescription length. It is also onmainand is unrelated to this change.Additional Context
Guiding rule: add or update a test only when it would fail if caller-visible behavior regressed. Coverage is a hint toward uncovered branches, not the gate.