This repository was archived by the owner on Nov 25, 2026. It is now read-only.
Repository navigation
Extract control plane - #11
Merged
Merged
Conversation
wmadden
added a commit
that referenced
this pull request
Mar 30, 2026
Updates design-questions.md: - Note High priority signal from MongoDB team on polymorphism/inheritance - Add design question #11 (introspection from existing databases) - Add design question #12 (extension packs for Vector Search, Atlas Search, geospatial) - Add design question #13 (CSFLE / queryable encryption) Updates user-promise.md: - Add introspection to the domain model promise - Add extension pack ecosystem (Vector Search, Atlas Search, geospatial) - Add CSFLE to non-promises section - Expand ecosystem comparison table with polymorphism, Vector/Atlas Search, change streams, and introspection rows
wmadden
added a commit
that referenced
this pull request
Mar 30, 2026
Updates design-questions.md: - Note High priority signal from MongoDB team on polymorphism/inheritance - Add design question #11 (introspection from existing databases) - Add design question #12 (extension packs for Vector Search, Atlas Search, geospatial) - Add design question #13 (CSFLE / queryable encryption) Updates user-promise.md: - Add introspection to the domain model promise - Add extension pack ecosystem (Vector Search, Atlas Search, geospatial) - Add CSFLE to non-promises section - Expand ecosystem comparison table with polymorphism, Vector/Atlas Search, change streams, and introspection rows
wmadden
added a commit
that referenced
this pull request
Mar 31, 2026
Updates design-questions.md: - Note High priority signal from MongoDB team on polymorphism/inheritance - Add design question #11 (introspection from existing databases) - Add design question #12 (extension packs for Vector Search, Atlas Search, geospatial) - Add design question #13 (CSFLE / queryable encryption) Updates user-promise.md: - Add introspection to the domain model promise - Add extension pack ecosystem (Vector Search, Atlas Search, geospatial) - Add CSFLE to non-promises section - Expand ecosystem comparison table with polymorphism, Vector/Atlas Search, change streams, and introspection rows
jkomyno
pushed a commit
that referenced
this pull request
Apr 1, 2026
Updates design-questions.md: - Note High priority signal from MongoDB team on polymorphism/inheritance - Add design question #11 (introspection from existing databases) - Add design question #12 (extension packs for Vector Search, Atlas Search, geospatial) - Add design question #13 (CSFLE / queryable encryption) Updates user-promise.md: - Add introspection to the domain model promise - Add extension pack ecosystem (Vector Search, Atlas Search, geospatial) - Add CSFLE to non-promises section - Expand ecosystem comparison table with polymorphism, Vector/Atlas Search, change streams, and introspection rows
wmadden
added a commit
that referenced
this pull request
May 8, 2026
The 17-commit M2 R4 chain (f618436 .. a42f2b0) attempted to delete the renamed-but-still-public legacy contributor surface (mkCodec, defineCodecGroup, defineCodecBundle) per Decision #9. The structural deletion landed cleanly (closing-grep zero hits across the entire repo) but produced unresolved typed-codec flow regressions in the sql-builder package that downstream tests depend on: - Removing mkCodec eliminated the source of typed Codec generics that PgByScalar / SqliteByScalar / PgVectorByScalar slots used to expose to consumers (typed encode/decode return types). - The descriptor-based replacement (ExtractDescriptorCodecTypes <PgDescriptors>, DescriptorResolvedCodec<D>) does not produce equivalent types under TypeScript's variance rules: the typed defineCodec factory return generics do not flow through ReturnType<ReturnType<D['factory']>> reliably, leading to SqlQueryPlan-shape mismatches in sql-builder/test/playground/ select.test-d.ts and CodecExpression argument-type errors in sql-builder/test/runtime/builders.test.ts. Two implementer subagents iterated on different fixes (typed-factory return tightening; structural type extraction; byScalar slot reshape) and both crashed mid-iteration on connection failures; their partial work landed as 17 commits + 4 reverts. The remaining typecheck breakage is a real type-system design problem, not an implementation bug. Rolling back to a29e062 (M2 R3 HEAD) leaves the project at a known-green state. Decision #11 in wip/unattended-decisions.md captures the situation and the user's options for the next step. This commit produces a tree byte-identical to a29e062. Closing-grep state at this commit matches M2 R3 close: legacy symbols (synthesizeNonParameterizedDescriptor, aliasCodec, etc.) are zero across packages/ test/ examples/ docs/, but the renamed M2 R3 surfaces (mkCodec, defineCodecGroup, defineCodecBundle) are back. F3 from the M2 R3 review is reopened.
jkomyno
added a commit
that referenced
this pull request
May 8, 2026
* #7 — SQLite AFTER-trigger mitigation: decision recorded as defer. JSDoc on buildRowIdentityCriterion + Query Lanes.md paragraph remain the documented mitigation; no runtime guard added until the SQLite adapter actually exercises id-less + AFTER-trigger contracts. * #8 — Asymmetric `returning` gate: comment at executeUpdateCount records the explicit design choice. Surface-level updateCount/ deleteCount require the capability; FK-rewrite cleanup (disconnect/setNull) does not, since no row data is read. * #9 — Trim WHAT-restating sentence from buildRowIdentityCriterion comment block. Remaining lines explain the genuinely non-obvious WHY: RETURNING-by-construction invariant + duplicate-tuple caveat + SQLite AFTER-trigger caveat. * #10 — Add typed `withoutPrimaryKey<TTable>(contract, table)` helper to test/helpers.ts mirroring `withCapabilities`. Migrate four call sites (createIdlessTagsCollection, createIdlessUsersCollection, two unit tests in mutation-executor.test.ts) from inline `as unknown as TestContract` casts to the helper. Cast lives in one place now. * #11 — Drop redundant `updateCount returns zero` integration test on id-less Tags. The zero-match path is already covered by unit tests on PK contracts and does not exercise id-less specifics. * #12 — Extract `getPrimaryKeyColumns(contract, tableName): readonly string[]` helper in collection-contract.ts. Replaces three duplicated raw-storage accesses (resolvePrimaryKeyColumn, pickCountReturningColumn, buildRowIdentityCriterion, the new P1 guard). * #13 — Plan doc references the post-rename name throughout. * #14 — Trim `resolvePrimaryKeyColumn` error to one sentence; the API guidance prose duplicated content already in Query Lanes.md. All 8 P3 todos marked complete. pnpm test:packages 110/110 green; pnpm lint:deps 0 violations. sql-orm-client suite is 501 (one fewer than before due to dropped redundant test).
wmadden
added a commit
that referenced
this pull request
May 9, 2026
The 17-commit M2 R4 chain (f618436 .. a42f2b0) attempted to delete the renamed-but-still-public legacy contributor surface (mkCodec, defineCodecGroup, defineCodecBundle) per Decision #9. The structural deletion landed cleanly (closing-grep zero hits across the entire repo) but produced unresolved typed-codec flow regressions in the sql-builder package that downstream tests depend on: - Removing mkCodec eliminated the source of typed Codec generics that PgByScalar / SqliteByScalar / PgVectorByScalar slots used to expose to consumers (typed encode/decode return types). - The descriptor-based replacement (ExtractDescriptorCodecTypes <PgDescriptors>, DescriptorResolvedCodec<D>) does not produce equivalent types under TypeScript's variance rules: the typed defineCodec factory return generics do not flow through ReturnType<ReturnType<D['factory']>> reliably, leading to SqlQueryPlan-shape mismatches in sql-builder/test/playground/ select.test-d.ts and CodecExpression argument-type errors in sql-builder/test/runtime/builders.test.ts. Two implementer subagents iterated on different fixes (typed-factory return tightening; structural type extraction; byScalar slot reshape) and both crashed mid-iteration on connection failures; their partial work landed as 17 commits + 4 reverts. The remaining typecheck breakage is a real type-system design problem, not an implementation bug. Rolling back to a29e062 (M2 R3 HEAD) leaves the project at a known-green state. Decision #11 in wip/unattended-decisions.md captures the situation and the user's options for the next step. This commit produces a tree byte-identical to a29e062. Closing-grep state at this commit matches M2 R3 close: legacy symbols (synthesizeNonParameterizedDescriptor, aliasCodec, etc.) are zero across packages/ test/ examples/ docs/, but the renamed M2 R3 surfaces (mkCodec, defineCodecGroup, defineCodecBundle) are back. F3 from the M2 R3 review is reopened.
wmadden
added a commit
that referenced
this pull request
May 9, 2026
The 17-commit M2 R4 chain (f618436 .. a42f2b0) attempted to delete the renamed-but-still-public legacy contributor surface (mkCodec, defineCodecGroup, defineCodecBundle) per Decision #9. The structural deletion landed cleanly (closing-grep zero hits across the entire repo) but produced unresolved typed-codec flow regressions in the sql-builder package that downstream tests depend on: - Removing mkCodec eliminated the source of typed Codec generics that PgByScalar / SqliteByScalar / PgVectorByScalar slots used to expose to consumers (typed encode/decode return types). - The descriptor-based replacement (ExtractDescriptorCodecTypes <PgDescriptors>, DescriptorResolvedCodec<D>) does not produce equivalent types under TypeScript's variance rules: the typed defineCodec factory return generics do not flow through ReturnType<ReturnType<D['factory']>> reliably, leading to SqlQueryPlan-shape mismatches in sql-builder/test/playground/ select.test-d.ts and CodecExpression argument-type errors in sql-builder/test/runtime/builders.test.ts. Two implementer subagents iterated on different fixes (typed-factory return tightening; structural type extraction; byScalar slot reshape) and both crashed mid-iteration on connection failures; their partial work landed as 17 commits + 4 reverts. The remaining typecheck breakage is a real type-system design problem, not an implementation bug. Rolling back to a29e062 (M2 R3 HEAD) leaves the project at a known-green state. Decision #11 in wip/unattended-decisions.md captures the situation and the user's options for the next step. This commit produces a tree byte-identical to a29e062. Closing-grep state at this commit matches M2 R3 close: legacy symbols (synthesizeNonParameterizedDescriptor, aliasCodec, etc.) are zero across packages/ test/ examples/ docs/, but the renamed M2 R3 surfaces (mkCodec, defineCodecGroup, defineCodecBundle) are back. F3 from the M2 R3 review is reopened.
wmadden
added a commit
that referenced
this pull request
May 9, 2026
The 17-commit M2 R4 chain (f618436 .. a42f2b0) attempted to delete the renamed-but-still-public legacy contributor surface (mkCodec, defineCodecGroup, defineCodecBundle) per Decision #9. The structural deletion landed cleanly (closing-grep zero hits across the entire repo) but produced unresolved typed-codec flow regressions in the sql-builder package that downstream tests depend on: - Removing mkCodec eliminated the source of typed Codec generics that PgByScalar / SqliteByScalar / PgVectorByScalar slots used to expose to consumers (typed encode/decode return types). - The descriptor-based replacement (ExtractDescriptorCodecTypes <PgDescriptors>, DescriptorResolvedCodec<D>) does not produce equivalent types under TypeScript's variance rules: the typed defineCodec factory return generics do not flow through ReturnType<ReturnType<D['factory']>> reliably, leading to SqlQueryPlan-shape mismatches in sql-builder/test/playground/ select.test-d.ts and CodecExpression argument-type errors in sql-builder/test/runtime/builders.test.ts. Two implementer subagents iterated on different fixes (typed-factory return tightening; structural type extraction; byScalar slot reshape) and both crashed mid-iteration on connection failures; their partial work landed as 17 commits + 4 reverts. The remaining typecheck breakage is a real type-system design problem, not an implementation bug. Rolling back to a29e062 (M2 R3 HEAD) leaves the project at a known-green state. Decision #11 in wip/unattended-decisions.md captures the situation and the user's options for the next step. This commit produces a tree byte-identical to a29e062. Closing-grep state at this commit matches M2 R3 close: legacy symbols (synthesizeNonParameterizedDescriptor, aliasCodec, etc.) are zero across packages/ test/ examples/ docs/, but the renamed M2 R3 surfaces (mkCodec, defineCodecGroup, defineCodecBundle) are back. F3 from the M2 R3 review is reopened.
wmadden
added a commit
that referenced
this pull request
May 9, 2026
The 17-commit M2 R4 chain (f618436 .. a42f2b0) attempted to delete the renamed-but-still-public legacy contributor surface (mkCodec, defineCodecGroup, defineCodecBundle) per Decision #9. The structural deletion landed cleanly (closing-grep zero hits across the entire repo) but produced unresolved typed-codec flow regressions in the sql-builder package that downstream tests depend on: - Removing mkCodec eliminated the source of typed Codec generics that PgByScalar / SqliteByScalar / PgVectorByScalar slots used to expose to consumers (typed encode/decode return types). - The descriptor-based replacement (ExtractDescriptorCodecTypes <PgDescriptors>, DescriptorResolvedCodec<D>) does not produce equivalent types under TypeScript's variance rules: the typed defineCodec factory return generics do not flow through ReturnType<ReturnType<D['factory']>> reliably, leading to SqlQueryPlan-shape mismatches in sql-builder/test/playground/ select.test-d.ts and CodecExpression argument-type errors in sql-builder/test/runtime/builders.test.ts. Two implementer subagents iterated on different fixes (typed-factory return tightening; structural type extraction; byScalar slot reshape) and both crashed mid-iteration on connection failures; their partial work landed as 17 commits + 4 reverts. The remaining typecheck breakage is a real type-system design problem, not an implementation bug. Rolling back to a29e062 (M2 R3 HEAD) leaves the project at a known-green state. Decision #11 in wip/unattended-decisions.md captures the situation and the user's options for the next step. This commit produces a tree byte-identical to a29e062. Closing-grep state at this commit matches M2 R3 close: legacy symbols (synthesizeNonParameterizedDescriptor, aliasCodec, etc.) are zero across packages/ test/ examples/ docs/, but the renamed M2 R3 surfaces (mkCodec, defineCodecGroup, defineCodecBundle) are back. F3 from the M2 R3 review is reopened.
wmadden
added a commit
that referenced
this pull request
May 12, 2026
Closes design holes #7, #8, #11, #13, #14 with one architectural decision (C12 in decisions.md): introduce the runtime target-layer class in v0.1 and have Supabase extend it. The runtime layer was class-based but missing the target tier: RuntimeCore (framework, abstract) <- SqlRuntimeImpl (sql family, internal). This project lifts SqlRuntimeImpl -> SqlRuntime (exported), adds PostgresRuntime (thin subclass, target-layer extension point), and lands SupabaseRuntime as PostgresRuntime's subclass. SET LOCAL is issued by SupabaseRuntime.execute() against the raw connection -- below the user middleware chain, structurally non-bypassable. Implicit transaction guarantees never-outlives-txn SET LOCAL state. JWT validation is eager behind a uniformly async factory. Mirrors TML-2459's three-layer IR pattern at the runtime axis. ~50 LOC of framework refactor; rationale and implementation sketch in the new ADR draft.
wmadden
added a commit
that referenced
this pull request
May 13, 2026
Closes design holes #7, #8, #11, #13, #14 with one architectural decision (C12 in decisions.md): introduce the runtime target-layer class in v0.1 and have Supabase extend it. The runtime layer was class-based but missing the target tier: RuntimeCore (framework, abstract) <- SqlRuntimeImpl (sql family, internal). This project lifts SqlRuntimeImpl -> SqlRuntime (exported), adds PostgresRuntime (thin subclass, target-layer extension point), and lands SupabaseRuntime as PostgresRuntime's subclass. SET LOCAL is issued by SupabaseRuntime.execute() against the raw connection -- below the user middleware chain, structurally non-bypassable. Implicit transaction guarantees never-outlives-txn SET LOCAL state. JWT validation is eager behind a uniformly async factory. Mirrors TML-2459's three-layer IR pattern at the runtime axis. ~50 LOC of framework refactor; rationale and implementation sketch in the new ADR draft.
wmadden
added a commit
that referenced
this pull request
May 13, 2026
Closes design holes #7, #8, #11, #13, #14 with one architectural decision (C12 in decisions.md): introduce the runtime target-layer class in v0.1 and have Supabase extend it. The runtime layer was class-based but missing the target tier: RuntimeCore (framework, abstract) <- SqlRuntimeImpl (sql family, internal). This project lifts SqlRuntimeImpl -> SqlRuntime (exported), adds PostgresRuntime (thin subclass, target-layer extension point), and lands SupabaseRuntime as PostgresRuntime's subclass. SET LOCAL is issued by SupabaseRuntime.execute() against the raw connection -- below the user middleware chain, structurally non-bypassable. Implicit transaction guarantees never-outlives-txn SET LOCAL state. JWT validation is eager behind a uniformly async factory. Mirrors TML-2459's three-layer IR pattern at the runtime axis. ~50 LOC of framework refactor; rationale and implementation sketch in the new ADR draft. Signed-off-by: Will Madden <[email protected]>
wmadden
added a commit
that referenced
this pull request
May 13, 2026
Closes design holes #7, #8, #11, #13, #14 with one architectural decision (C12 in decisions.md): introduce the runtime target-layer class in v0.1 and have Supabase extend it. The runtime layer was class-based but missing the target tier: RuntimeCore (framework, abstract) <- SqlRuntimeImpl (sql family, internal). This project lifts SqlRuntimeImpl -> SqlRuntime (exported), adds PostgresRuntime (thin subclass, target-layer extension point), and lands SupabaseRuntime as PostgresRuntime's subclass. SET LOCAL is issued by SupabaseRuntime.execute() against the raw connection -- below the user middleware chain, structurally non-bypassable. Implicit transaction guarantees never-outlives-txn SET LOCAL state. JWT validation is eager behind a uniformly async factory. Mirrors TML-2459's three-layer IR pattern at the runtime axis. ~50 LOC of framework refactor; rationale and implementation sketch in the new ADR draft. Signed-off-by: Will Madden <[email protected]>
wmadden
added a commit
that referenced
this pull request
May 13, 2026
Closes design holes #7, #8, #11, #13, #14 with one architectural decision (C12 in decisions.md): introduce the runtime target-layer class in v0.1 and have Supabase extend it. The runtime layer was class-based but missing the target tier: RuntimeCore (framework, abstract) <- SqlRuntimeImpl (sql family, internal). This project lifts SqlRuntimeImpl -> SqlRuntime (exported), adds PostgresRuntime (thin subclass, target-layer extension point), and lands SupabaseRuntime as PostgresRuntime's subclass. SET LOCAL is issued by SupabaseRuntime.execute() against the raw connection -- below the user middleware chain, structurally non-bypassable. Implicit transaction guarantees never-outlives-txn SET LOCAL state. JWT validation is eager behind a uniformly async factory. Mirrors TML-2459's three-layer IR pattern at the runtime axis. ~50 LOC of framework refactor; rationale and implementation sketch in the new ADR draft. Signed-off-by: Will Madden <[email protected]>
wmadden
added a commit
that referenced
this pull request
May 26, 2026
Reflect PR review feedback in the project artifacts. The wrapper option renames from `output` to `outputPath`, the CLI flag renames from `--output <path>` to `--output-path <dir>`, and the semantics shift from "user supplies the .json file path, framework substitutes .d.ts" to "user supplies the directory, framework picks contract.json + contract.d.ts as canonical filenames". Updates: - spec: directory semantics in scope, file-path & soft-warning surface out, FRs rewritten, canonical-filename invariant called out - design-notes: new "Design pivot" section explains the file-path → directory-path shift and why; alternatives list updated to reflect what was rejected during the pivot - slice spec: edge-case map rewritten for directory semantics (#8 #9 #13 removed, canonical-filename invariant added as #11), SDoD wording updated for the new CLI flag + manual-QA command - slice plan: original d1/d2/d3 sections preserved as historical record; new "PR-review-response round" section summarizes the renames, semantic shift, deletions, and post-rebase commit set - project plan: scope summary updated to directory semantics; the pre-pivot risks (CLI wiring scope, soft-warning surface choice) are now resolved Signed-off-by: Will Madden <[email protected]>
wmadden
added a commit
that referenced
this pull request
May 26, 2026
Reflect PR review feedback in the project artifacts. The wrapper option renames from `output` to `outputPath`, the CLI flag renames from `--output <path>` to `--output-path <dir>`, and the semantics shift from "user supplies the .json file path, framework substitutes .d.ts" to "user supplies the directory, framework picks contract.json + contract.d.ts as canonical filenames". Updates: - spec: directory semantics in scope, file-path & soft-warning surface out, FRs rewritten, canonical-filename invariant called out - design-notes: new "Design pivot" section explains the file-path → directory-path shift and why; alternatives list updated to reflect what was rejected during the pivot - slice spec: edge-case map rewritten for directory semantics (#8 #9 #13 removed, canonical-filename invariant added as #11), SDoD wording updated for the new CLI flag + manual-QA command - slice plan: original d1/d2/d3 sections preserved as historical record; new "PR-review-response round" section summarizes the renames, semantic shift, deletions, and post-rebase commit set - project plan: scope summary updated to directory semantics; the pre-pivot risks (CLI wiring scope, soft-warning surface choice) are now resolved Signed-off-by: Will Madden <[email protected]>
wmadden
added a commit
that referenced
this pull request
May 26, 2026
Reflect PR review feedback in the project artifacts. The wrapper option renames from `output` to `outputPath`, the CLI flag renames from `--output <path>` to `--output-path <dir>`, and the semantics shift from "user supplies the .json file path, framework substitutes .d.ts" to "user supplies the directory, framework picks contract.json + contract.d.ts as canonical filenames". Updates: - spec: directory semantics in scope, file-path & soft-warning surface out, FRs rewritten, canonical-filename invariant called out - design-notes: new "Design pivot" section explains the file-path → directory-path shift and why; alternatives list updated to reflect what was rejected during the pivot - slice spec: edge-case map rewritten for directory semantics (#8 #9 #13 removed, canonical-filename invariant added as #11), SDoD wording updated for the new CLI flag + manual-QA command - slice plan: original d1/d2/d3 sections preserved as historical record; new "PR-review-response round" section summarizes the renames, semantic shift, deletions, and post-rebase commit set - project plan: scope summary updated to directory semantics; the pre-pivot risks (CLI wiring scope, soft-warning surface choice) are now resolved Signed-off-by: Will Madden <[email protected]>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.