Skip to content
This repository was archived by the owner on Nov 25, 2026. It is now read-only.

Improve CLI output - #13

Merged
wmadden merged 5 commits into
mainfrom
improve-cli-output
Nov 14, 2025
Merged

wmadden merged 5 commits into
mainfrom
improve-cli-output

Conversation

@wmadden

@wmadden wmadden commented Nov 14, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@wmadden
wmadden merged commit 2f60ce7 into main Nov 14, 2025
@wmadden
wmadden deleted the improve-cli-output branch November 14, 2025 12:10
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
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 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 17, 2026
A reader picking up a manual-QA script — runner, reviewer, or someone returning to it weeks after the fact — needs the minimum context to make the scenarios legible *embedded in the script itself*. A `**Spec:** <path>` link is not a substitute: it forces a context-switch into a separate doc just to know what's being tested, and most readers skip the switch and try to infer intent from the TOC.

Add a new required "What this script is testing" section to the document skeleton (bug/motivation, fix/what changed, why manual QA matters), workflow step 4 telling the author how to derive it from the spec's Summary, a Key Concepts entry, Pitfall #13, and a Checklist row.

The "why manual QA matters" paragraph doubles as a sanity check: if the author can't name a gap CI doesn't already cover, the entire script may be redundant — escalate to "When Not to Use" rather than padding scenarios.

Surfaced while reviewing the first script written under this skill (TML-2536's `manual-qa.md`). Mirrors the same change in prisma/ignite#93.

Signed-off-by: Will Madden <[email protected]>
wmadden added a commit that referenced this pull request May 18, 2026
A reader picking up a manual-QA script — runner, reviewer, or someone returning to it weeks after the fact — needs the minimum context to make the scenarios legible *embedded in the script itself*. A `**Spec:** <path>` link is not a substitute: it forces a context-switch into a separate doc just to know what's being tested, and most readers skip the switch and try to infer intent from the TOC.

Add a new required "What this script is testing" section to the document skeleton (bug/motivation, fix/what changed, why manual QA matters), workflow step 4 telling the author how to derive it from the spec's Summary, a Key Concepts entry, Pitfall #13, and a Checklist row.

The "why manual QA matters" paragraph doubles as a sanity check: if the author can't name a gap CI doesn't already cover, the entire script may be redundant — escalate to "When Not to Use" rather than padding scenarios.

Surfaced while reviewing the first script written under this skill (TML-2536's `manual-qa.md`). Mirrors the same change in prisma/ignite#93.

Signed-off-by: Will Madden <[email protected]>
wmadden added a commit that referenced this pull request May 18, 2026
A reader picking up a manual-QA script — runner, reviewer, or someone returning to it weeks after the fact — needs the minimum context to make the scenarios legible *embedded in the script itself*. A `**Spec:** <path>` link is not a substitute: it forces a context-switch into a separate doc just to know what's being tested, and most readers skip the switch and try to infer intent from the TOC.

Add a new required "What this script is testing" section to the document skeleton (bug/motivation, fix/what changed, why manual QA matters), workflow step 4 telling the author how to derive it from the spec's Summary, a Key Concepts entry, Pitfall #13, and a Checklist row.

The "why manual QA matters" paragraph doubles as a sanity check: if the author can't name a gap CI doesn't already cover, the entire script may be redundant — escalate to "When Not to Use" rather than padding scenarios.

Surfaced while reviewing the first script written under this skill (TML-2536's `manual-qa.md`). Mirrors the same change in prisma/ignite#93.

Signed-off-by: Will Madden <[email protected]>
wmadden added a commit that referenced this pull request May 18, 2026
A reader picking up a manual-QA script — runner, reviewer, or someone returning to it weeks after the fact — needs the minimum context to make the scenarios legible *embedded in the script itself*. A `**Spec:** <path>` link is not a substitute: it forces a context-switch into a separate doc just to know what's being tested, and most readers skip the switch and try to infer intent from the TOC.

Add a new required "What this script is testing" section to the document skeleton (bug/motivation, fix/what changed, why manual QA matters), workflow step 4 telling the author how to derive it from the spec's Summary, a Key Concepts entry, Pitfall #13, and a Checklist row.

The "why manual QA matters" paragraph doubles as a sanity check: if the author can't name a gap CI doesn't already cover, the entire script may be redundant — escalate to "When Not to Use" rather than padding scenarios.

Surfaced while reviewing the first script written under this skill (TML-2536's `manual-qa.md`). Mirrors the same change in prisma/ignite#93.

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]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant