Skip to content

Polish emit command - and CLI in general#6

Merged
wmadden merged 48 commits intomainfrom
emit-polish
Nov 13, 2025
Merged

Polish emit command - and CLI in general#6
wmadden merged 48 commits intomainfrom
emit-polish

Conversation

@wmadden
Copy link
Copy Markdown
Contributor

@wmadden wmadden commented Nov 13, 2025

No description provided.

@wmadden wmadden merged commit 0631662 into main Nov 13, 2025
6 of 7 checks passed
@aqrln aqrln deleted the emit-polish branch December 15, 2025 13:54
jkomyno added a commit that referenced this pull request Feb 25, 2026
… actions

Address wmadden's PR #168 review feedback (blocking issue #2):

- Add DDL generation test: verifies the planner outputs ON DELETE CASCADE
  and ON UPDATE RESTRICT clauses when planning from a contract with
  referential actions against an empty database.
- Add runtime behavior tests for all five ON DELETE actions:
  CASCADE (removes children), RESTRICT (blocks delete), SET NULL
  (nullifies FK), SET DEFAULT (applies default), NO ACTION (blocks).
- Add ON UPDATE CASCADE test: propagates PK changes to children.

These tests close the spec-mandated E2E coverage gap for the referential
action matrix (spec lines 158-203, acceptance criteria #5-#6).
wmadden added a commit that referenced this pull request Mar 30, 2026
…arget

Polymorphism is a cross-family concern — SQL needs single-table
inheritance and enum-discriminated rows, MongoDB needs polymorphic
collections, embedded fields, and mixed-type arrays. Both require
discriminated unions in the contract type system.

Rewrites design question #6 to cover both families with concrete storage
mapping patterns and defines minimum April validation scope: contract
can express discriminated unions, emitter produces narrowed TS types,
ORM queries return narrowed types, STI storage mapping works for both
families.
wmadden added a commit that referenced this pull request Mar 30, 2026
Promote design principles (self-describing domain model, domain/persistence
separation, scoped family details, facts-not-instructions) to cross-cutting
learnings. Update contract-symmetry with domain/storage separation proposal.
Update design questions #1 (embedding as relation property), #6 (discriminator
+ variants), #10 (domain level as shared contract surface) with concrete
design answers. Update overview with redesign summary.
wmadden added a commit that referenced this pull request Mar 30, 2026
Lead with the answer for resolved questions instead of preserving
the historical options/insights/redesign layers. Mark headings with
resolved/open status so readers know immediately.
wmadden added a commit that referenced this pull request Mar 30, 2026
Phase 3 (minimal Mongo ORM) proved the contract shape. Comparative
analysis with the SQL ORM revealed the Collection chaining API,
CollectionState, and row type inference are shared architectural
patterns. Record this finding:

- ADR 4: shared Collection interface with fluent chaining, family-
  specific compilation at terminal methods, spike-then-extract approach
- Cross-cutting learning #6: shared ORM surface enumeration
- Mongo Overview: Phase 3 complete, DQ #7 resolved, ADR 4 referenced
- PoC plan: Phase 3 moved to completed, Phase 4 rewritten for
  Collection interface direction
wmadden added a commit that referenced this pull request Mar 30, 2026
…arget

Polymorphism is a cross-family concern — SQL needs single-table
inheritance and enum-discriminated rows, MongoDB needs polymorphic
collections, embedded fields, and mixed-type arrays. Both require
discriminated unions in the contract type system.

Rewrites design question #6 to cover both families with concrete storage
mapping patterns and defines minimum April validation scope: contract
can express discriminated unions, emitter produces narrowed TS types,
ORM queries return narrowed types, STI storage mapping works for both
families.
wmadden added a commit that referenced this pull request Mar 30, 2026
Promote design principles (self-describing domain model, domain/persistence
separation, scoped family details, facts-not-instructions) to cross-cutting
learnings. Update contract-symmetry with domain/storage separation proposal.
Update design questions #1 (embedding as relation property), #6 (discriminator
+ variants), #10 (domain level as shared contract surface) with concrete
design answers. Update overview with redesign summary.
wmadden added a commit that referenced this pull request Mar 30, 2026
Lead with the answer for resolved questions instead of preserving
the historical options/insights/redesign layers. Mark headings with
resolved/open status so readers know immediately.
wmadden added a commit that referenced this pull request Mar 30, 2026
Phase 3 (minimal Mongo ORM) proved the contract shape. Comparative
analysis with the SQL ORM revealed the Collection chaining API,
CollectionState, and row type inference are shared architectural
patterns. Record this finding:

- ADR 4: shared Collection interface with fluent chaining, family-
  specific compilation at terminal methods, spike-then-extract approach
- Cross-cutting learning #6: shared ORM surface enumeration
- Mongo Overview: Phase 3 complete, DQ #7 resolved, ADR 4 referenced
- PoC plan: Phase 3 moved to completed, Phase 4 rewritten for
  Collection interface direction
wmadden added a commit that referenced this pull request Mar 31, 2026
…arget

Polymorphism is a cross-family concern — SQL needs single-table
inheritance and enum-discriminated rows, MongoDB needs polymorphic
collections, embedded fields, and mixed-type arrays. Both require
discriminated unions in the contract type system.

Rewrites design question #6 to cover both families with concrete storage
mapping patterns and defines minimum April validation scope: contract
can express discriminated unions, emitter produces narrowed TS types,
ORM queries return narrowed types, STI storage mapping works for both
families.
wmadden added a commit that referenced this pull request Mar 31, 2026
Promote design principles (self-describing domain model, domain/persistence
separation, scoped family details, facts-not-instructions) to cross-cutting
learnings. Update contract-symmetry with domain/storage separation proposal.
Update design questions #1 (embedding as relation property), #6 (discriminator
+ variants), #10 (domain level as shared contract surface) with concrete
design answers. Update overview with redesign summary.
wmadden added a commit that referenced this pull request Mar 31, 2026
Lead with the answer for resolved questions instead of preserving
the historical options/insights/redesign layers. Mark headings with
resolved/open status so readers know immediately.
wmadden added a commit that referenced this pull request Mar 31, 2026
Phase 3 (minimal Mongo ORM) proved the contract shape. Comparative
analysis with the SQL ORM revealed the Collection chaining API,
CollectionState, and row type inference are shared architectural
patterns. Record this finding:

- ADR 4: shared Collection interface with fluent chaining, family-
  specific compilation at terminal methods, spike-then-extract approach
- Cross-cutting learning #6: shared ORM surface enumeration
- Mongo Overview: Phase 3 complete, DQ #7 resolved, ADR 4 referenced
- PoC plan: Phase 3 moved to completed, Phase 4 rewritten for
  Collection interface direction
jkomyno pushed a commit that referenced this pull request Apr 1, 2026
…arget

Polymorphism is a cross-family concern — SQL needs single-table
inheritance and enum-discriminated rows, MongoDB needs polymorphic
collections, embedded fields, and mixed-type arrays. Both require
discriminated unions in the contract type system.

Rewrites design question #6 to cover both families with concrete storage
mapping patterns and defines minimum April validation scope: contract
can express discriminated unions, emitter produces narrowed TS types,
ORM queries return narrowed types, STI storage mapping works for both
families.
jkomyno pushed a commit that referenced this pull request Apr 1, 2026
Promote design principles (self-describing domain model, domain/persistence
separation, scoped family details, facts-not-instructions) to cross-cutting
learnings. Update contract-symmetry with domain/storage separation proposal.
Update design questions #1 (embedding as relation property), #6 (discriminator
+ variants), #10 (domain level as shared contract surface) with concrete
design answers. Update overview with redesign summary.
jkomyno pushed a commit that referenced this pull request Apr 1, 2026
Lead with the answer for resolved questions instead of preserving
the historical options/insights/redesign layers. Mark headings with
resolved/open status so readers know immediately.
jkomyno pushed a commit that referenced this pull request Apr 1, 2026
Phase 3 (minimal Mongo ORM) proved the contract shape. Comparative
analysis with the SQL ORM revealed the Collection chaining API,
CollectionState, and row type inference are shared architectural
patterns. Record this finding:

- ADR 4: shared Collection interface with fluent chaining, family-
  specific compilation at terminal methods, spike-then-extract approach
- Cross-cutting learning #6: shared ORM surface enumeration
- Mongo Overview: Phase 3 complete, DQ #7 resolved, ADR 4 referenced
- PoC plan: Phase 3 moved to completed, Phase 4 rewritten for
  Collection interface direction
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