Show how a config's values compare to the compiled defaults - #38
Merged
Conversation
Alongside coverage, the mapping audit now diffs every value a config supplies
against the flag's compiled default: `changesDefault` is what the config actually
changes, `matchesDefault` is what it merely restates and could drop, and `defaults`
carries the full per-flag comparison.
Default vs config:
changes (2):
• new-onboarding: false → true
• tier: "free" → "pro"
restated (2) — same as the default, could be omitted:
• markets
• page-size
Purely informational — restating a default, or changing it, is not a coverage
problem, so isComplete is untouched. It reuses the same mapped boxes a real apply
would store, so a whole number sent for a Double flag matches a Double default
rather than reading as a change.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NnwCqKNm8rZ63Au6bpYdaD
The highest-risk path for a false "change": a record list restated by the config must compare equal to its compiled default, and config field order must not matter. Both canonicalise to sorted-key JSON, so both hold — locked in. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NnwCqKNm8rZ63Au6bpYdaD
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.
Alongside coverage, the mapping audit now diffs every value a config supplies against
the flag's compiled default — so a large file tells you what it actually does, not
just that it parses.
changesDefault— the values this config actually changes.matchesDefault— the values it restates identically to the compiled default, andcould drop from a bloated file.
defaults— the full per-flag comparison (FlagDefaultComparison), for asserting ona specific flag.
Informational only
Whether a value matches its default or differs from it,
isCompleteis untouched.Restating a default is not a coverage failure, and neither is changing one — it is a
diff, for you to read and assert on as you like. Independent of
absent: a flag theconfig never supplies has no incoming value and does not appear in the diff.
Reuses the mapped values
It compares the boxes a real apply would store, not the raw JSON, so a whole number
sent for a
Doubleflag matches aDoubledefault — JSON's single number type doesnot create a false change. A record list restated exactly matches its default, and
config field order does not matter, since both canonicalise to sorted-key JSON. Both
are pinned by tests — the record path is where a false change was most likely.
Verified
752 tests on a clean build. DocC clean with
--warnings-as-errors, both example appsand the iOS package scheme build. Additive only — no breaking changes.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NnwCqKNm8rZ63Au6bpYdaD