Repository navigation
feat(config): rename column_contract_mode to check_declared_columns - #1434
Merged
Merged
Conversation
settings.check_declared_columns = true | false replaces settings.column_contract_mode = "implicit" | "explicit". The old key stays as a deprecated alias that prints one warning naming the new key, and setting both keys is an error.
A reused compile, served by the native launcher or the Python CLI, now prints the deprecated-setting warning before replaying stored output.
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.
Why
settings.column_contract_mode = "implicit" | "explicit"named how a project opts in, not what happens. The setting only decides whether declared columns on models without acontractline are checked against the SELECT.Changes
[settings] check_declared_columns = true | false, defaulttrue.truechecks that every declared column is in the SELECT and checks its nullability;falseleaves declared columns as metadata, type enforcement and audit attachment, the same as per-modelcontract none. Per-modelcontract enforced/contract nonestill override.column_contract_modestays as a deprecated alias (implicit→true,explicit→false). Compiling prints one warning line naming the new key, and setting both keys is an error.SettingsConfig.check_declared_columns: boolreplacescolumn_contract_mode, and theColumnContractModeenum is removed (hosted-shapes list updated).sqb compiledocs, and the shipped skill references use the new key.Verification
false, both alias values, an invalid alias value, a non-boolean value and both keys set. A compile test checks the alias warning appears once and the new key prints none. An E2E test checks a warm reused compile still warns; it fails without either half of the reuse fix.cargo testfor sqlbuild-config, sqlbuild-cache and sqlbuild-analysis passes;make check-cipasses.