Repository navigation
feat: contract diffs + breaking-change gates (Bundle 7) - #11
Merged
Merged
Conversation
5 tasks done
iamgp
force-pushed
the
feat/contracts-breaking
branch
2 times, most recently
from
September 14, 2026 08:59
4ffa819 to
311bee4
Compare
iamgp
force-pushed
the
feat/contracts-breaking
branch
from
September 14, 2026 09:53
311bee4 to
d74ccbf
Compare
iamgp
force-pushed
the
feat/contracts-breaking
branch
2 times, most recently
from
September 14, 2026 12:19
dee5b27 to
ff7d3e6
Compare
iamgp
force-pushed
the
feat/contracts-breaking
branch
from
September 14, 2026 13:25
ff7d3e6 to
be7820b
Compare
iamgp
force-pushed
the
feat/contracts-breaking
branch
2 times, most recently
from
September 14, 2026 15:49
d164888 to
b304805
Compare
…alysis, declared renames, persisted contracts Bundle 7 on top of shared state/cache. Turns the opaque contract_hash change into a structured, machine-readable contract diff and gates promotion on breaking contract changes, computed live. - contracts.rs: contract_diff classifies SAFE/REVIEW/BREAKING per change — contract added/dropped, enforcement on/off, column added/removed/renamed, type changes (numeric widening review, incompatible breaking), nullability tighten/relax. - Declared renames: [model.<name>.renames] new = "old" resolves a removed+added pair into a reviewable rename in both contract and physical schema diffs. Stale or ambiguous declarations resolve nothing — they cannot hide a real removal or addition. - MaterializedRecord persists the full contract (contract_json, SQLite + Postgres with migration), so base/target comparisons work against what the environment actually recorded. - BranchDiffReport gains contract_changes and lineage-aware impacts naming the downstream models/tests a breaking change affects. - Promotion: contract breaks join physical schema breaks in the schema gate, computed live against the target's recorded contracts — a contract edited after `diff` cannot slip past on a stale artifact. --allow-breaking-schema waives both. - plan/explain reasons name the changed columns and breaking count instead of "contract or assertions changed".
iamgp
force-pushed
the
feat/contracts-breaking
branch
from
September 14, 2026 16:26
b304805 to
813d01f
Compare
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.
Summary
Bundle 7 of the lakehouse-native stack, based on Bundle 6 (#10). Turns the opaque
contract_hashchange into a structured contract diff and gates promotion on breaking contract changes — computed live, so a stale artifact cannot hide them.contracts.rs:contract_diffclassifies every contract change SAFE / REVIEW / BREAKING — contract declared/dropped, enforcement on/off, column added/removed/renamed, type changes (numeric widening = review, incompatible = breaking), nullability tighten (review) / relax (safe).[model.<name>.renames] new = "old"resolves a removed+added pair into a reviewable rename in both the contract diff and the physical schema diff. Stale or ambiguous declarations resolve nothing — they cannot mask a real removal or addition.MaterializedRecord.contract->contract_jsonin both SQLite and Postgres state (with migration), so candidate-vs-target comparisons run against what the environment actually recorded.contract_changessection + lineage-awareimpactsnaming the downstream models/tests each breaking change hits.schemagate, computed live from the workspace's desired contracts against the target's recorded contracts — editing a contract afterdiffcannot slip past on a stale artifact.--allow-breaking-schemawaives both.Test plan
cargo test --workspace— all suites greencargo clippy --workspace --all-targets -- -D warnings— cleancargo fmt --all -- --check— cleancontracts.rscovering every classification + stale/ambiguous renamesdiff.rsrename tests incl. stale-declaration edge casescontract_breaking_changesgate incl. default-env foldingStacked on #10 — do not merge independently.