Skip to content

feat: apply contract defaults to sources - #724

Merged
chio-labs-delivery[bot] merged 1 commit into
mainfrom
feat/global-contract-source-defaults
Sep 18, 2026
Merged

chio-labs-delivery[bot] merged 1 commit into
mainfrom
feat/global-contract-source-defaults

Conversation

@kvlonge

@kvlonge kvlonge commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Why

[defaults].contract already supplies the effective contract policy for models, and contract Rules evaluate that effective configuration. Sources still required a repeated contract: enforced field on every declaration, so one project-wide contract policy could not cover both resource types consistently.

Changes

  • apply the project contract default to sources that do not declare a local policy
  • preserve explicit source overrides such as contract: none
  • verify SQBRCONTRACT101 accepts model enforcement inherited from project defaults
  • add source binding coverage proving the inherited enforced policy is authoritative

Verification

  • uv run pytest tests/integration/src/sqlbuild/compiler/pipeline/test_semantic_binding.py tests/integration/src/sqlbuild/cli/commands/main/test_rules.py -n auto --dist loadfile (72 passed)
  • focused post-rebase contract-default tests (4 passed)
  • make check-ci
  • downstream 974-model static validation of project-wide model and source enforcement; this correctly exposed separately tracked pre-existing model type-proof debt rather than weakening the default
  • public repository hygiene scan

@chio-labs-delivery
chio-labs-delivery Bot enabled auto-merge (squash) September 18, 2026 06:07
@chio-labs-delivery
chio-labs-delivery Bot merged commit 5ad3e97 into main Sep 18, 2026
18 checks passed
@chio-labs-delivery
chio-labs-delivery Bot deleted the feat/global-contract-source-defaults branch September 18, 2026 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant