Repository navigation
fix(core): keep all fields and record provenance when a manifest overrides a token - #1573
Merged
Merged
Conversation
added 2 commits
October 31, 2026 13:13
…rides a token An override now replaces the foundation record in place, keeps its other fields and records overriddenBy and overriddenFrom. Legacy output drops the provenance markers. Specify the behavior in manifest.md and cover it with a fixture-platform cascade test.
🦋 Changeset detectedLatest commit: cd7bdb5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Run report for cd7bdb5eTotal time: 2m 46s | Comparison time: 4m 39s | Estimated savings: 1m 53s (40.6% faster)
Changed files |
Contributor
🧩 Component Schema Changes ReportNo component schema changes detected.This comment was automatically generated by the component schema diff tool. 🤖 |
Contributor
🎨 Token Changes ReportTokens Changed (0)Original Branch: This comment was automatically generated by the token diff tool. 🤖 |
…rriddenBy to the code Revert the Prettier rewrite of unrelated sections so the diff shows only the overrides change. The manifest case of overriddenBy is the literal file name, so the spec says that.
…fix/override-keeps-fields
This was referenced Oct 31, 2026
Merged
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
A manifest
overridesentry now replaces the foundation record in place and keeps every field of it ($schema,$valueType,description,lifecycle,uuidand so on), changing onlyvalueor$ref. The replaced record carriesoverriddenByandoverriddenFrom. Two commits:fix(core): the override fix, its spec text inmanifest.md, and a fixture-platform cascade test.fix(figma):design-data figma export --platformkept only one color-scheme mode of an overridden token (the three iOS seafoam tokens lost their dark value). Overrides now group with their foundation siblings.Related Issue
Bead spectrum-design-data-p6ga.8.9 (override field preservation), part of the split of #1569 (bead p6ga.9). Follow-up for the shared root cause: spectrum-design-data-p6ga.8.50.
Motivation and Context
Before this, an override produced a synthetic record with only
name,valueanduuid, so every other field was lost. The fix is independent of the visual recipes work.Behavior change to know about:
overriddenBy({platform}or{manifest}) andoverriddenFrom(the foundationvalueor$ref) now appear on overridden tokens in platform query output. Untouched tokens carry no marker. With two overrides on one token the last value wins and the firstoverriddenFromis kept.legacy.rsdrops the markers, but that strip is defensive: the legacy converter copies only a fixed set of fields, so the markers never reach the output either way. The legacy test is a contract pin (the override value is exported, no provenance appears). It passes without the strip, and it does not claim the strip fixes anything.file: manifest.json, so cascaded legacy output writes it to a separate file and splits its color set. The Figma fix in commit 2 works around the same overloaded field. The cleaner end state is to keep the foundation record's file, carry provenance only inoverriddenByand drop the exporter special case. Tracked in spectrum-design-data-p6ga.8.50.How Has This Been Tested?
sdk/core/tests/platform_cascade.rsreplaces the earlier tests (which neededcore::visual) and keeps every case: field preservation,valueto$refand back, the type-change error, the manifest-name fallback, two overrides on one token (firstoverriddenFromwins), and the legacy-output contract. It also keeps the cascade audit tests (include/exclude, extensions, mode sets). Only the render test is left out; it follows with the recipes work.overridden_color_token_keeps_all_its_modes.cargo fmt --check,cargo clippy -p design-data-core -p design-data-figma --all-targets -- -D warnings,cargo testfor both crates,moon run sdk:test(1598 passed),design-data:legacy-output,tokens:verifyLegacyOutput,design-data:validate. No golden or legacy output changed.pnpm install --frozen-lockfile,pnpm ai:check, changeset linter with--fail-on-warnings, emptygit diff pnpm-lock.yaml.Screenshots (if appropriate):
N/A
Types of changes
Changesets:
platform-override-keeps-fields(@adobe/design-data-specpatch,@adobe/design-data-wasmpatch, 18 body lines) andfigma-export-override-modes(@adobe/design-data-tuipatch, 8 body lines), each under 20 lines.Checklist: