feat(config): store config defaults and provide sparse mapping functions - #6205
Draft
kanadgupta wants to merge 1 commit into
Draft
feat(config): store config defaults and provide sparse mapping functions#6205kanadgupta wants to merge 1 commit into
kanadgupta wants to merge 1 commit into
Conversation
Adds ADR 0017 pinning the design for the config defaults mapping function ahead of implementation: a pure, parameterized subtract core in @supabase/config, defaults derived from schema annotations, strict deep equality, and the remote-block baseline rule. Also seeds a root CONTEXT.md glossary with the project's config vocabulary. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Implements CLI-2155: a stored reference of config default values and a mapping function that omits values matching them, so
config diff(CLI-2156) andconfig pull(CLI-2064) can compare sparse configs instead of full effective ones.Currently in this PR (design docs; implementation follows on this branch):
docs/adr/0017-sparse-config-subtraction.md): pins the design before code lands. Key points:defaultannotations by decoding{}(getDefaultProjectConfig()), not from a hand-written table that would drift.subtractProjectConfig(config, baseline)(strict deep equality, order-sensitive arrays, empty sections dropped), withomitDefaultValues(config)as the defaults-baseline entry point.[remotes.*]against global defaults — a remote value equal to a global default still overrides a differing base value. A remote block's correct baseline is the merged base config (applied by CLI-2156).@supabase/configfree of Management API types.🤖 Generated with Claude Code