Repository navigation
refactor: define project discovery models natively - #379
Merged
Merged
Conversation
Project, pipeline, target, default, naming and step configuration shapes are native classes and compiler/discovery/models.py re-exports them. The discovery KafkaSettings is registered natively as DiscoveryKafkaSettings and keeps its public name, module and field-hiding repr, separate from the compile KafkaSettings; the boundary allows that one alias in that module only. Movable Python drops from 1774 to 1080 lines.
kvlonge
enabled auto-merge (squash)
November 11, 2026 05:33
Deploying sqltide with
|
| Latest commit: |
aa12b2e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1f49ce7c.sqltide.pages.dev |
| Branch Preview URL: | https://wip-native-discovery-models-7j7f.sqltide.pages.dev |
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
Python in SQLTide should be a thin wrapper. Project discovery configuration is built and read by the native core and is not part of the authored API, so its shapes belong there too.
Changes
compiler/discovery/models.pyre-exports them.KafkaSettingsis registered natively asDiscoveryKafkaSettingsand keeps its public name, module and field-hiding repr, separate from the compileKafkaSettings. The boundary allows that one alias, in that module only, with negative tests for an unlisted alias, the alias in another module and the name under another alias.remaining_lines1774→1080; no new stays.Introspection and subclassing of internal shapes
As in the previous shape releases: native shapes have no
vars()/__dict__, generic field types, annotations, signatures and docstrings, and Python subclasses are not dataclass subclasses.copy.copyrebuilds frozen container fields, so they are equal but not the same objects.Verification
make check-cion the final head; goldens unedited. A new test pins the discoveryKafkaSettingsrepr hiding every field, and passes on 0.65.13. Against 0.65.13: 6×1500 differential cases match, includingProjectSpecErrorchecks, coercion order, defaults, factories, repr, equality, hash and misuse calls; 14 planted mutations are caught; earlier slices' differentials, CLI and dev-server API outputs are identical after masking.