This repository was archived by the owner on Nov 25, 2026. It is now read-only.
Repository navigation
Remove SQL -> Runtime dependency - #9
Merged
Merged
Conversation
saevarb
pushed a commit
that referenced
this pull request
Mar 23, 2026
…dness columnTypeCheck compares atttypid via ::regtype which drops type modifiers. A postcheck for varchar(255) incorrectly passes against a varchar(64) column because both resolve to the same base type OID. This test plans a varchar(64) to varchar(255) reconciliation and runs the postcheck against the unchanged column to expose the gap. Also updates reconciliation-open-issues.md to correct the #3 dismissal and document the issue as Bug #9.
saevarb
pushed a commit
that referenced
this pull request
Mar 23, 2026
…pen issues The columnTypeCheck typmod blindness was fixed on fix/planner-issues with format_type(). Remove the now-passing known-failure test (replaced by a proper e2e test on the parent branch) and move Bug #9 to the fixed section in open-issues.
wmadden
added a commit
that referenced
this pull request
May 4, 2026
…res (TML-2369) Drops `@prisma/dev` and the `scripts/db-dev.ts` wrapper from the example: the PGlite TCP shim hangs under workerd 's Hyperdrive emulator (see plan.md Open items #9 / cloudflare/workers-sdk#12984), so M3 is moving its local origin to a vanilla `postgres:16` container. Wires `docker-compose.yml` (port 5433 to avoid clashing with `prisma-next-demo`'s Postgres.app) plus `pnpm db:up` / `db:down` / `db:reset` scripts, and points `.env.example` at the docker URL. The `test` script flips back to a real `vitest run` (the deferral stub goes away in the next commit, when the integration suite lands). Lockfile diff is just the `@prisma/dev` removal plus an unrelated `tinyrainbow` patch bump pulled in by `pnpm install`.
saevarb
pushed a commit
that referenced
this pull request
May 6, 2026
…res (TML-2369) Drops `@prisma/dev` and the `scripts/db-dev.ts` wrapper from the example: the PGlite TCP shim hangs under workerd 's Hyperdrive emulator (see plan.md Open items #9 / cloudflare/workers-sdk#12984), so M3 is moving its local origin to a vanilla `postgres:16` container. Wires `docker-compose.yml` (port 5433 to avoid clashing with `prisma-next-demo`'s Postgres.app) plus `pnpm db:up` / `db:down` / `db:reset` scripts, and points `.env.example` at the docker URL. The `test` script flips back to a real `vitest run` (the deferral stub goes away in the next commit, when the integration suite lands). Lockfile diff is just the `@prisma/dev` removal plus an unrelated `tinyrainbow` patch bump pulled in by `pnpm install`.
wmadden
added a commit
that referenced
this pull request
May 8, 2026
Introduce `buildCodec({id, encode, decode, encodeJson?, decodeJson?})`
in `framework-components/codec` so descriptor `factory` bodies and
ad-hoc test fixtures can construct narrow `Codec` instances without
reaching for the legacy `mkCodec(...)` / family-side codec factory.
The helper accepts strictly the runtime instance shape — `id` and the
four conversion methods — and refuses `targetTypes` / `traits` / `meta`
/ `paramsSchema` / `init` / `renderOutputType` at the type level so it
cannot serve as a back-door for the retired contributor surface (the
`@ts-expect-error` block in `test/build-codec.test.ts` pins this).
Sync `encode` / `decode` are auto promise-lifted (per ADR 204);
`encodeJson` / `decodeJson` default to identity when omitted so codecs
whose `TInput` is JSON-safe stay concise.
This unblocks the next M2 R4 commits, which retire `mkCodec`,
`defineCodecGroup`, and `defineCodecBundle` from `relational-core`
(decisions #4 / #9 / #10 in the unattended-decisions log).
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
Introduce `buildCodec({id, encode, decode, encodeJson?, decodeJson?})`
in `framework-components/codec` so descriptor `factory` bodies and
ad-hoc test fixtures can construct narrow `Codec` instances without
reaching for the legacy `mkCodec(...)` / family-side codec factory.
The helper accepts strictly the runtime instance shape — `id` and the
four conversion methods — and refuses `targetTypes` / `traits` / `meta`
/ `paramsSchema` / `init` / `renderOutputType` at the type level so it
cannot serve as a back-door for the retired contributor surface (the
`@ts-expect-error` block in `test/build-codec.test.ts` pins this).
Sync `encode` / `decode` are auto promise-lifted (per ADR 204);
`encodeJson` / `decodeJson` default to identity when omitted so codecs
whose `TInput` is JSON-safe stay concise.
This unblocks the next M2 R4 commits, which retire `mkCodec`,
`defineCodecGroup`, and `defineCodecBundle` from `relational-core`
(decisions #4 / #9 / #10 in the unattended-decisions log).
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
Introduce `buildCodec({id, encode, decode, encodeJson?, decodeJson?})`
in `framework-components/codec` so descriptor `factory` bodies and
ad-hoc test fixtures can construct narrow `Codec` instances without
reaching for the legacy `mkCodec(...)` / family-side codec factory.
The helper accepts strictly the runtime instance shape — `id` and the
four conversion methods — and refuses `targetTypes` / `traits` / `meta`
/ `paramsSchema` / `init` / `renderOutputType` at the type level so it
cannot serve as a back-door for the retired contributor surface (the
`@ts-expect-error` block in `test/build-codec.test.ts` pins this).
Sync `encode` / `decode` are auto promise-lifted (per ADR 204);
`encodeJson` / `decodeJson` default to identity when omitted so codecs
whose `TInput` is JSON-safe stay concise.
This unblocks the next M2 R4 commits, which retire `mkCodec`,
`defineCodecGroup`, and `defineCodecBundle` from `relational-core`
(decisions #4 / #9 / #10 in the unattended-decisions log).
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
Introduce `buildCodec({id, encode, decode, encodeJson?, decodeJson?})`
in `framework-components/codec` so descriptor `factory` bodies and
ad-hoc test fixtures can construct narrow `Codec` instances without
reaching for the legacy `mkCodec(...)` / family-side codec factory.
The helper accepts strictly the runtime instance shape — `id` and the
four conversion methods — and refuses `targetTypes` / `traits` / `meta`
/ `paramsSchema` / `init` / `renderOutputType` at the type level so it
cannot serve as a back-door for the retired contributor surface (the
`@ts-expect-error` block in `test/build-codec.test.ts` pins this).
Sync `encode` / `decode` are auto promise-lifted (per ADR 204);
`encodeJson` / `decodeJson` default to identity when omitted so codecs
whose `TInput` is JSON-safe stay concise.
This unblocks the next M2 R4 commits, which retire `mkCodec`,
`defineCodecGroup`, and `defineCodecBundle` from `relational-core`
(decisions #4 / #9 / #10 in the unattended-decisions log).
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
Introduce `buildCodec({id, encode, decode, encodeJson?, decodeJson?})`
in `framework-components/codec` so descriptor `factory` bodies and
ad-hoc test fixtures can construct narrow `Codec` instances without
reaching for the legacy `mkCodec(...)` / family-side codec factory.
The helper accepts strictly the runtime instance shape — `id` and the
four conversion methods — and refuses `targetTypes` / `traits` / `meta`
/ `paramsSchema` / `init` / `renderOutputType` at the type level so it
cannot serve as a back-door for the retired contributor surface (the
`@ts-expect-error` block in `test/build-codec.test.ts` pins this).
Sync `encode` / `decode` are auto promise-lifted (per ADR 204);
`encodeJson` / `decodeJson` default to identity when omitted so codecs
whose `TInput` is JSON-safe stay concise.
This unblocks the next M2 R4 commits, which retire `mkCodec`,
`defineCodecGroup`, and `defineCodecBundle` from `relational-core`
(decisions #4 / #9 / #10 in the unattended-decisions log).
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
… closures; record orphan-table residual as Open Item #9
wmadden
added a commit
that referenced
this pull request
May 9, 2026
… closures; record orphan-table residual as Open Item #9
6 tasks
wmadden
added a commit
that referenced
this pull request
May 10, 2026
… closures; record orphan-table residual as Open Item #9
wmadden
added a commit
that referenced
this pull request
May 10, 2026
… closures; record orphan-table residual as Open Item #9
wmadden
added a commit
that referenced
this pull request
May 19, 2026
…ions
Adds step 4.5 to drive-close-project (and the supporting pattern
catalogue + pitfalls) so close-out catches files whose content is
methodology but whose voice is project-shaping -- the failure mode
that produced our own close-outs cruft.
The trial-period finding under drive/project/findings.md records the
specific gap surfaced by closing out drive-domain-model:
- problem-statement.md migrated as long-lived (it was a proposal
letter to canonical maintainers).
- skill-conventions.md migrated as long-lived (it was titled "Skill
restructuring plan" and described what we changed, not the
resulting conventions).
- workflow.md migrated with "Bold = new (this project adds it)"
framing baked in -- meaningless to a fresh reader.
- definition-of-ready.md and definition-of-done.md migrated with
"Worked example for prisma-next:" sections that duplicate
overlays already lifted into drive/<category>/README.md.
- trial.md migrated as long-lived despite documenting a specific
2026-05-19 -> 2026-06-02 window.
What the skill update adds:
1. Step 4.5 -- prose audit on every long-lived candidate. Four smell
tests: project-shaping voice in headings / prose; status blocks
tied to project lifecycle; worked-example pollution duplicating
project-context; worked examples anchored to specific real-world
incidents. Each match yields a per-file disposition: rewrite-at-
migration, lift-example-to-context, soften-at-migration, or
reclassify-as-transient.
2. Step 5 confirmation extended to cover the disposition (the
operator signs off on the disposition, not just the
classification).
3. Step 6 migration extended to apply dispositions
(rewrite / lift / soften instead of bare git mv where the audit
matched).
4. Default classification table extended:
- *-restructure.md / migration-plan.md / *-changes.md -> transient
(execution plans describing project deltas).
- problem-statement.md / pitch.md / proposal.md / motivation.md
-> transient (project-shaping / advocacy artefacts).
- trial.md / validation.md / rollout.md -> transient
(time-windowed execution artefacts).
- principles/**, model.md, workflow.md, *-conventions.md flagged
"long-lived (prose-audit at step 4.5)" -- still long-lived by
default, audit catches the exceptions.
5. Three new pitfalls (#8, #9, #10) covering the three audit-caught
failure modes.
6. Checklist updated to require dispositions recorded + operator
confirmation covering them.
Slices A + B (separate commits) apply the audit to the existing
docs/drive/ tree and clear the cruft this same finding surfaced.
Linked issue: TML-2549. Trial-period finding contributes to TML-2567
upstream-PR synthesis.
Signed-off-by: Will Madden <[email protected]>
wmadden
added a commit
that referenced
this pull request
May 19, 2026
…ions
Adds step 4.5 to drive-close-project (and the supporting pattern
catalogue + pitfalls) so close-out catches files whose content is
methodology but whose voice is project-shaping -- the failure mode
that produced our own close-outs cruft.
The trial-period finding under drive/project/findings.md records the
specific gap surfaced by closing out drive-domain-model:
- problem-statement.md migrated as long-lived (it was a proposal
letter to canonical maintainers).
- skill-conventions.md migrated as long-lived (it was titled "Skill
restructuring plan" and described what we changed, not the
resulting conventions).
- workflow.md migrated with "Bold = new (this project adds it)"
framing baked in -- meaningless to a fresh reader.
- definition-of-ready.md and definition-of-done.md migrated with
"Worked example for prisma-next:" sections that duplicate
overlays already lifted into drive/<category>/README.md.
- trial.md migrated as long-lived despite documenting a specific
2026-05-19 -> 2026-06-02 window.
What the skill update adds:
1. Step 4.5 -- prose audit on every long-lived candidate. Four smell
tests: project-shaping voice in headings / prose; status blocks
tied to project lifecycle; worked-example pollution duplicating
project-context; worked examples anchored to specific real-world
incidents. Each match yields a per-file disposition: rewrite-at-
migration, lift-example-to-context, soften-at-migration, or
reclassify-as-transient.
2. Step 5 confirmation extended to cover the disposition (the
operator signs off on the disposition, not just the
classification).
3. Step 6 migration extended to apply dispositions
(rewrite / lift / soften instead of bare git mv where the audit
matched).
4. Default classification table extended:
- *-restructure.md / migration-plan.md / *-changes.md -> transient
(execution plans describing project deltas).
- problem-statement.md / pitch.md / proposal.md / motivation.md
-> transient (project-shaping / advocacy artefacts).
- trial.md / validation.md / rollout.md -> transient
(time-windowed execution artefacts).
- principles/**, model.md, workflow.md, *-conventions.md flagged
"long-lived (prose-audit at step 4.5)" -- still long-lived by
default, audit catches the exceptions.
5. Three new pitfalls (#8, #9, #10) covering the three audit-caught
failure modes.
6. Checklist updated to require dispositions recorded + operator
confirmation covering them.
Slices A + B (separate commits) apply the audit to the existing
docs/drive/ tree and clear the cruft this same finding surfaced.
Linked issue: TML-2549. Trial-period finding contributes to TML-2567
upstream-PR synthesis.
Signed-off-by: Will Madden <[email protected]>
wmadden
added a commit
that referenced
this pull request
May 19, 2026
…ions
Adds step 4.5 to drive-close-project (and the supporting pattern
catalogue + pitfalls) so close-out catches files whose content is
methodology but whose voice is project-shaping -- the failure mode
that produced our own close-outs cruft.
The trial-period finding under drive/project/findings.md records the
specific gap surfaced by closing out drive-domain-model:
- problem-statement.md migrated as long-lived (it was a proposal
letter to canonical maintainers).
- skill-conventions.md migrated as long-lived (it was titled "Skill
restructuring plan" and described what we changed, not the
resulting conventions).
- workflow.md migrated with "Bold = new (this project adds it)"
framing baked in -- meaningless to a fresh reader.
- definition-of-ready.md and definition-of-done.md migrated with
"Worked example for prisma-next:" sections that duplicate
overlays already lifted into drive/<category>/README.md.
- trial.md migrated as long-lived despite documenting a specific
2026-05-19 -> 2026-06-02 window.
What the skill update adds:
1. Step 4.5 -- prose audit on every long-lived candidate. Four smell
tests: project-shaping voice in headings / prose; status blocks
tied to project lifecycle; worked-example pollution duplicating
project-context; worked examples anchored to specific real-world
incidents. Each match yields a per-file disposition: rewrite-at-
migration, lift-example-to-context, soften-at-migration, or
reclassify-as-transient.
2. Step 5 confirmation extended to cover the disposition (the
operator signs off on the disposition, not just the
classification).
3. Step 6 migration extended to apply dispositions
(rewrite / lift / soften instead of bare git mv where the audit
matched).
4. Default classification table extended:
- *-restructure.md / migration-plan.md / *-changes.md -> transient
(execution plans describing project deltas).
- problem-statement.md / pitch.md / proposal.md / motivation.md
-> transient (project-shaping / advocacy artefacts).
- trial.md / validation.md / rollout.md -> transient
(time-windowed execution artefacts).
- principles/**, model.md, workflow.md, *-conventions.md flagged
"long-lived (prose-audit at step 4.5)" -- still long-lived by
default, audit catches the exceptions.
5. Three new pitfalls (#8, #9, #10) covering the three audit-caught
failure modes.
6. Checklist updated to require dispositions recorded + operator
confirmation covering them.
Slices A + B (separate commits) apply the audit to the existing
docs/drive/ tree and clear the cruft this same finding surfaced.
Linked issue: TML-2549. Trial-period finding contributes to TML-2567
upstream-PR synthesis.
Signed-off-by: Will Madden <[email protected]>
wmadden
added a commit
that referenced
this pull request
May 26, 2026
Adds --output <path> to `prisma-next contract emit`. The flag overrides contractConfig.output at the control-API entry point with CLI > config > default precedence (TML-2664). Implementation details: - ContractEmitOptions gains outputOverride?: string (resolved by the CLI caller before passing in; passed verbatim to executeContractEmit). - executeContractEmit uses effectiveOutput = outputOverride ?? contractConfig.output. - resolveHeaderPaths passes the override through to the header display and handles non-.json extensions gracefully (no throw; display paths derived by suffix substitution so warnings can fire before the emit attempt). - computeOutputWarnings emits soft warnings (via ui.warn()) for: - non-.json extension (#8) - directory-shaped paths — trailing / or \ (#9) - collision with a contract source input file (#13) - Relative --output values are resolved against cwd (CLI convention); the resolution happens before the value reaches the control-API. Help snapshot updated to include the new flag and example. TML-2664 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
Adds --output <path> to `prisma-next contract emit`. The flag overrides contractConfig.output at the control-API entry point with CLI > config > default precedence (TML-2664). Implementation details: - ContractEmitOptions gains outputOverride?: string (resolved by the CLI caller before passing in; passed verbatim to executeContractEmit). - executeContractEmit uses effectiveOutput = outputOverride ?? contractConfig.output. - resolveHeaderPaths passes the override through to the header display and handles non-.json extensions gracefully (no throw; display paths derived by suffix substitution so warnings can fire before the emit attempt). - computeOutputWarnings emits soft warnings (via ui.warn()) for: - non-.json extension (#8) - directory-shaped paths — trailing / or \ (#9) - collision with a contract source input file (#13) - Relative --output values are resolved against cwd (CLI convention); the resolution happens before the value reaches the control-API. Help snapshot updated to include the new flag and example. TML-2664 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
Adds --output <path> to `prisma-next contract emit`. The flag overrides contractConfig.output at the control-API entry point with CLI > config > default precedence (TML-2664). Implementation details: - ContractEmitOptions gains outputOverride?: string (resolved by the CLI caller before passing in; passed verbatim to executeContractEmit). - executeContractEmit uses effectiveOutput = outputOverride ?? contractConfig.output. - resolveHeaderPaths passes the override through to the header display and handles non-.json extensions gracefully (no throw; display paths derived by suffix substitution so warnings can fire before the emit attempt). - computeOutputWarnings emits soft warnings (via ui.warn()) for: - non-.json extension (#8) - directory-shaped paths — trailing / or \ (#9) - collision with a contract source input file (#13) - Relative --output values are resolved against cwd (CLI convention); the resolution happens before the value reaches the control-API. Help snapshot updated to include the new flag and example. TML-2664 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]>
tensordreams
added a commit
that referenced
this pull request
Jun 2, 2026
…-2787) Write slice artifacts. Spec corrected mid-flight (decision #9: connect also disabled on required-payload junctions). Type-level .create disable deferred (decision #8 — needs a contract .d.ts emitter change, operator decision). Signed-off-by: Alexey Orlenko's AI Agent <[email protected]>
tensordreams
added a commit
that referenced
this pull request
Jun 2, 2026
…-2787) Write slice artifacts. Spec corrected mid-flight (decision #9: connect also disabled on required-payload junctions). Type-level .create disable deferred (decision #8 — needs a contract .d.ts emitter change, operator decision). Signed-off-by: Alexey Orlenko's AI Agent <[email protected]>
tensordreams
added a commit
that referenced
this pull request
Jun 12, 2026
…-2787) Write slice artifacts. Spec corrected mid-flight (decision #9: connect also disabled on required-payload junctions). Type-level .create disable deferred (decision #8 — needs a contract .d.ts emitter change, operator decision). Signed-off-by: Alexey Orlenko's AI Agent <[email protected]>
tensordreams
added a commit
that referenced
this pull request
Jun 12, 2026
…-2787) Write slice artifacts. Spec corrected mid-flight (decision #9: connect also disabled on required-payload junctions). Type-level .create disable deferred (decision #8 — needs a contract .d.ts emitter change, operator decision). Signed-off-by: Alexey Orlenko's AI Agent <[email protected]>
tensordreams
added a commit
that referenced
this pull request
Jun 12, 2026
…-2787) Write slice artifacts. Spec corrected mid-flight (decision #9: connect also disabled on required-payload junctions). Type-level .create disable deferred (decision #8 — needs a contract .d.ts emitter change, operator decision). Signed-off-by: Alexey Orlenko's AI Agent <[email protected]>
tensordreams
added a commit
that referenced
this pull request
Jun 16, 2026
…-2787) Write slice artifacts. Spec corrected mid-flight (decision #9: connect also disabled on required-payload junctions). Type-level .create disable deferred (decision #8 — needs a contract .d.ts emitter change, operator decision). Signed-off-by: Alexey Orlenko's AI Agent <[email protected]>
tensordreams
added a commit
that referenced
this pull request
Jun 16, 2026
…-2787) Write slice artifacts. Spec corrected mid-flight (decision #9: connect also disabled on required-payload junctions). Type-level .create disable deferred (decision #8 — needs a contract .d.ts emitter change, operator decision). Signed-off-by: Alexey Orlenko's AI Agent <[email protected]>
This was referenced Jun 24, 2026
paulwer
pushed a commit
to paulwer/prisma-next
that referenced
this pull request
Jul 12, 2026
…substrate; delete workspace (prisma#867) ## Linked issue Close-out of [Marker/ledger via typed query AST](https://linear.app/prisma-company/project/markerledger-via-typed-query-ast-dc62ab25d151). Phase-2 op porting + the project's deferred ADR migrate into the new project [Typed DDL migration ops — complete the conversion](https://linear.app/prisma-company/project/typed-ddl-migration-ops-complete-the-conversion-9a86e44d4c38) (TML-2919/2920/2921/2922/2923/2925/2927/2866). ## At a glance ``` 137 files changed, 9067 deletions(-) ``` Removes `projects/migrate-marker-ledger-to-typed-query-ast-commands/` after the final retro, and migrates the durable design notes (the seven design principles, the DDL visitor + dispatch model, the table-level constraint shape, the codec-handling split, the planner-lowering mechanism, the Mongo runner-boundary lowering) into the successor project's workspace as draft material for **TML-2923**'s ADR. No source-code changes. External-reference scan was clean before the delete. The design notes land at [`projects/typed-ddl-migration-ops/typed-ddl-design-notes.md`](projects/typed-ddl-migration-ops/typed-ddl-design-notes.md) — the workspace of the successor "Typed DDL migration ops" project, whose `spec.md`/`plan.md` arrive on `main` with PR [prisma#840](prisma#840) (in flight). The notes are voice-rewritten to strip the project-shaping framing (the close-out workflow's Step 4.5 disposition) and banner-marked as draft-for-TML-2923 — its ADR slice absorbs/replaces this file when it lands. ## Decision Project closes; workspace is deleted. The project's DoD is met or explicitly-deferred-with-ticket: 1. All 11 slices merged. 2. Final retro recorded (commit `36279033f` immediately preceding the delete). 3. Long-lived methodology — the seven design principles + the DDL-as-target-contributed-AST model + the table-constraint shape + codec-handling split + planner lowering mechanism — migrated to the successor project's workspace as draft material that TML-2923's ADR absorbs. The canonical ADR ("DDL as a target-contributed query-AST kind + adapter DDL-lowering seam") + Adapters & Targets / Migration System subsystem-doc updates are owned by TML-2923 in the successor project, where the dust from Phase-2's remaining design decisions has to settle first. 4. No external references to the project dir; nothing to re-point or remove. ## Project DoD verification (acceptance criteria in [spec.md](https://github.com/prisma/prisma-next/blob/fbcda64af/projects/migrate-marker-ledger-to-typed-query-ast-commands/spec.md)) | AC | Status | Evidence | |---|---|---| | Team-DoD floor | ✅ met | repo-wide gates green on every merged slice; Linear close-out via this PR; ADR audit covered by AC prisma#9 (deferred) | | SQL query AST represents `CREATE TABLE` + `CREATE SCHEMA` as target-contributed nodes | ✅ met | Slice 1 (TML-2761, foundational) — merged | | All in-scope marker/ledger ops execute via `adapter.lower()` → driver; zero `db.collection()` in `marker-ledger.ts` | ✅ met | Slice 2 (TML-2753 SQL) + Slice 3 (TML-2825 Mongo) — both merged | | Each family's marker CRUD behind one control-adapter SPI; duplicate read paths + `parseContractMarkerRow` + raw-SQL write builders collapsed | ✅ met | TML-2753 outcome (sql-marker-ops-through-adapter) | | `SqlControlAdapter` exposes marker-write methods symmetric with `MongoControlAdapter` | ✅ met | TML-2753 | | Contract-free construction surface per family; no in-scope op hand-builds nodes by object literal or concatenates raw SQL | ✅ met | TML-2761 (SQL DDL surface) + TML-2825 corrective round 2 (Mongo). Phase-2 op-porting tracked by TML-2919/2920/2921/2922 in the successor project. | | Two `as` casts in Mongo `marker-ledger.ts` eliminated; cast ratchet not regressed | ✅ met | TML-2825 | | Invariant-merge converges on accumulate-dedupe across PG + SQLite; test pins for both dialects | ✅ met | TML-2753 | | Migration planner adopts typed AST across all three targets (or residual deferred with tracked follow-ups) | ✅ met | Phase 1 closed: Slice 5 SQLite ([prisma#768](prisma#768) / TML-2859), Slice 7 PG ALTER ([prisma#813](prisma#813)), Slice 6 Mongo ([prisma#816](prisma#816) / TML-2888). Residual op-porting deferred to the successor project. | | ADR "DDL as a target-contributed query-AST kind + adapter DDL-lowering seam" + subsystem-doc updates (Adapters & Targets, Migration System) | 🟡 partially met | Durable design notes migrated to [`projects/typed-ddl-migration-ops/typed-ddl-design-notes.md`](projects/typed-ddl-migration-ops/typed-ddl-design-notes.md) as draft material; canonical ADR + subsystem-doc updates owned by **TML-2923** in the successor project, where the dust from Phase-2's remaining design decisions has to settle first. | ## Slices merged in this project | Slice | Linear | PR | |---|---|---| | `ddl-in-query-ast` (foundational) | TML-2761 | merged | | `sql-marker-ops-through-adapter` | TML-2753 | merged | | `mongo-marker-ledger-through-adapter` | TML-2825 | merged | | `planner-create-table-adopts-ddl-ast` | TML-2754 | [prisma#751](prisma#751) | | `codec-routed-ddl-defaults` | TML-2867 | [prisma#794](prisma#794) | | `sqlite-create-table-adoption` (Phase 1) | TML-2859 | [prisma#768](prisma#768) | | `pg-add-column-pioneer` (Phase 1) | — | [prisma#813](prisma#813) | | `mongo-planner-create-collection-and-index-adoption` (Phase 1) | TML-2888 | [prisma#816](prisma#816) | | `typed-migration-verification-queries` | TML-2889 | [prisma#825](prisma#825) | | `un-namespaced-pg-defaults-to-public` | TML-2916 | [prisma#838](prisma#838) | | `pg-addcolumn-opid-and-codecref-roundtrip` | TML-2918 | [prisma#837](prisma#837) | ## What follows in the successor project [Typed DDL migration ops — complete the conversion](https://linear.app/prisma-company/project/typed-ddl-migration-ops-complete-the-conversion-9a86e44d4c38) owns: - **TML-2919** (in flight as [prisma#840](prisma#840)) — PG: remaining raw-SQL op-builders → typed DDL; delete `buildAddColumnSql`. - **TML-2920** — PG: model `CREATE EXTENSION` as first-class entity kind. - **TML-2921** — SQLite: convert op execute steps to typed DDL. - **TML-2922** — SQLite: `RecreateTable` + AST growth (`CASE WHEN`, row-tuple `IN`). - **TML-2866** — SQLite inline-autoincrement: stop smuggling column options through `DdlColumn.type`. - **TML-2923** — ADR + subsystem docs (the deferred AC prisma#10 from this project). - **TML-2925** — Rewrite `dataTransform` op factory: defer lowering, type the EXISTS wrapper. - **TML-2927** — Introduce `PostgresTableRef` end-to-end (typed table refs). ## Reviewer notes - **Deletion is the only behavioral change** — 56 files removed, 5087 deletions, zero additions outside the final retro. Source code, fixtures, examples, and tests are untouched. - **External-reference scan was empty** before delete (`rg -l "projects/migrate-marker-ledger-to-typed-query-ast-commands/" --glob '!projects/migrate-marker-ledger-to-typed-query-ast-commands/**' --glob '!.git/**'` returned no matches). No links to re-point. - **The two commits are intentionally split** (`docs(marker-ledger): final close-out retro` then `chore: close out … — delete workspace`) so the final retro is preserved as a tracked commit on `main` for archeology if anyone later asks "how did Phase 2 get extracted out cleanly?" - **The migrated doc is *draft material*, not a finished ADR.** The design notes capture the steady-state architecture (the principles, the visitor/dispatch model, the constraint shape, the codec split, the lowering mechanism); they live in the successor project's workspace alongside its `spec.md`/`plan.md`, where TML-2923's ADR slice absorbs/replaces it. Writing the canonical ADR here, before the remaining Phase-2 design decisions (TML-2919/2920/2921/2922) land, would produce a doc that drifts within weeks. - **The doc lands on `main` before the successor project's workspace does** (TML-2919/prisma#840 also creates `projects/typed-ddl-migration-ops/` but is in flight). If this PR merges first, my commit creates the dir; if prisma#840 merges first, my file lands next to its spec/plan. Either order works. ## Testing performed - Worktree gates not re-run for a delete-only PR; the merged slices each shipped with their own gate runs. - `rg` reference scan confirmed pre-delete. ## Skill update n/a — internal project workspace removal. ## Checklist - [x] All commits signed off (DCO). - [x] Scoped to one logical concern (project close-out). - [x] Tests are updated — `n/a` (delete-only, no behavioral change). - [x] PR title in `<TICKET-or-scope>: <sentence-case title>` form. - [x] **Skill update** filled in (`n/a`). --------- Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> Co-authored-by: Claude Sonnet 4.6 <[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.