Terminal
Terminal/Skill
Traces why an accepted Chromatic visual change reappears or fails to reach the target branch, using build links, CI logs and Git history.
By Chromatic
Works with
npx skills add chromaui/chromatic-skills --skill diagnose-chromatic-baselinesFind the first build where the expected baseline stopped carrying forward. Separate confirmed evidence from facts that only Chromatic Support can verify.
Obtain:
Read reference/collect-evidence.md for customer-safe collection methods. Do not block on optional API access when build pages and logs provide enough evidence.
Resolve scripts/ and reference/ paths from the directory that contains this SKILL.md. Do not resolve them from the customer's repository.
Run:
python3 scripts/analyze_chromatic_log.py /path/to/chromatic.log \
--expected-parent <accepted-pr-commit> \
--merge-commit <target-branch-merge-commit>
Pass --known-lookup-limit only when Chromatic Support supplied the deployed value for this incident. The script has no default limit and must not guess one.
If the report classifies the log as a same-commit rebuild, find the preceding build on that commit. Analyze the preceding build instead.
For a regular merge, run:
git merge-base --is-ancestor <accepted-pr-commit> <first-target-branch-commit>
Interpret the exit code:
0: Git contains the accepted PR commit in the target commit's ancestry.1: Git does not contain that relationship. This is normal after squash and rebase merges.For GitHub repositories, retrieve customer-visible merge information:
gh pr view <pr-number> \
--repo <owner/repository> \
--json mergeCommit,headRefOid,mergeStateStatus,mergedAt
Use the repository host's equivalent command or UI when the project does not use GitHub.
| Evidence | Customer-safe conclusion | Next step |
|---|---|---|
| The PR test was not accepted | The expected acceptance was not recorded on that test | Verify the reviewed story, mode, build, and test |
| The current commit equals the previous branch-build commit | This is a rebuild | Analyze the first build on the commit |
| The accepted PR commit appears in submitted parent commits | The ancestry handoff included the expected commit | Ask Support to trace exact baseline selection if the wrong image remains |
Regular merge ancestry exits 0, but the accepted commit is absent from submitted parents | Git ancestry and submitted build ancestry disagree | Send the Git result and CLI report to Support |
| Squash or rebase merge, and the accepted commit is absent from submitted parents | The public evidence does not show a link to the accepted PR build | Use the mitigation below and ask Support to inspect provider linkage |
| Support supplied a lookup limit and the merge position exceeds it | The merge lies outside the confirmed lookup window | Ask Support to confirm the product-side cause and remediation |
| No support-supplied limit exists | Lookup truncation is unconfirmed | Report the merge position without guessing the limit |
| A later PR head differs from the accepted commit | A later PR build may have changed the inherited state | Inspect the intervening PR builds |
Read reference/baseline-model.md before explaining acceptance, ancestry, merge strategy, or rebuild behavior.
Choose only mitigations supported by the evidence:
Do not recommend changing clone filters unless Git reports missing commit objects or ancestry errors.
Start with one sentence that states the strongest confirmed conclusion. Then include:
Use reference/support-handoff.md when the remaining question requires Chromatic-only data.
Use precise labels:
Stop when the evidence reaches the external access boundary. Do not replace missing evidence with a theory.
reference/collect-evidence.mdreference/baseline-model.mdreference/support-handoff.mdtemplate.mdexamples/customer-baseline-handoff.mdevaluations/README.md