Skip to content

Commit f9eb395

Browse files
SevInfclaude
andcommitted
refactor(scalar-arrays): drop comments describing cross-codebase field usage
Remove the capability-matrix field JSDocs (and the scalar-list gate comment) that described how the field is produced (control stack / enrichContract) and consumed (authoring-time gating) elsewhere. The `capabilities: CapabilityMatrix` field and the gate diagnostic are self-documenting. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Serhii Tatarintsev <tatarintsev@prisma.io>
1 parent 3307fbd commit f9eb395

4 files changed

Lines changed: 0 additions & 27 deletions

File tree

packages/1-framework/1-core/config/src/contract-source-types.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ export interface ContractSourceContext {
4646
readonly codecLookup: CodecLookup;
4747
readonly controlMutationDefaults: ControlMutationDefaults;
4848
readonly resolvedInputs: readonly string[];
49-
/**
50-
* Merged capability matrix from the control stack's `[target, adapter, ...extensionPacks]`
51-
* descriptors — the same merge `enrichContract` performs at emit time. Authoring-time
52-
* gating (e.g. scalar lists) reads `capabilities.sql?.scalarList`; an empty matrix
53-
* fails closed and rejects gated features. The control stack always populates it.
54-
*/
5549
readonly capabilities: CapabilityMatrix;
5650
}
5751

packages/1-framework/1-core/framework-components/src/control/control-stack.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,6 @@ export interface ControlStack<
6464
readonly authoringContributions: AssembledAuthoringContributions;
6565
readonly scalarTypeDescriptors: ReadonlyMap<string, string>;
6666
readonly controlMutationDefaults: ControlMutationDefaults;
67-
/**
68-
* Merged capability matrix folded from the `[target, adapter, ...extensionPacks]`
69-
* descriptors — the same merge `enrichContract` performs at emit time. Authoring
70-
* paths read this to gate features (e.g. scalar lists) before the contract is
71-
* produced, so an unsupported construct is rejected with a diagnostic rather than
72-
* silently emitted.
73-
*/
7467
readonly capabilities: CapabilityMatrix;
7568
}
7669

packages/2-sql/2-authoring/contract-psl/src/interpreter.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,6 @@ export interface InterpretPslDocumentToSqlContractInput {
133133
readonly createNamespace: (input: SqlNamespaceInput) => SqlNamespaceBase;
134134
readonly codecLookup?: CodecLookup;
135135
readonly seedDiagnostics?: readonly ContractSourceDiagnostic[];
136-
/**
137-
* Merged capability matrix from the control stack's
138-
* `[target, adapter, ...extensionPacks]` descriptors. Authoring-time gating
139-
* (e.g. scalar lists) reads `capabilities.sql?.scalarList`; an empty matrix
140-
* fails closed and rejects gated features. The control stack always populates it.
141-
*/
142136
readonly capabilities: CapabilityMatrix;
143137
}
144138

packages/2-sql/2-authoring/contract-psl/src/psl-field-resolution.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,6 @@ export interface CollectResolvedFieldsInput {
148148
readonly sourceId: string;
149149
readonly scalarTypeDescriptors: ReadonlyMap<string, ColumnDescriptor>;
150150
readonly enumHandles?: ReadonlyMap<string, EnumTypeHandle>;
151-
/**
152-
* Merged adapter capability matrix. A scalar list field whose target does not
153-
* report `sql.scalarList` is rejected with `PSL_SCALAR_LIST_UNSUPPORTED_TARGET`;
154-
* an empty matrix fails closed and rejects scalar lists.
155-
*/
156151
readonly capabilities: CapabilityMatrix;
157152
}
158153

@@ -360,9 +355,6 @@ export function collectResolvedFields(input: CollectResolvedFieldsInput): Resolv
360355
if (isValueObjectField) {
361356
descriptor = scalarTypeDescriptors.get('Json');
362357
} else if (isListField) {
363-
// Scalar lists lower to a native array storage column; gate them on the
364-
// adapter-reported `sql.scalarList` capability. The gate fails closed: a
365-
// matrix that omits the capability (SQLite, or an empty matrix) rejects.
366358
if (capabilities['sql']?.['scalarList'] !== true) {
367359
diagnostics.push({
368360
code: 'PSL_SCALAR_LIST_UNSUPPORTED_TARGET',

0 commit comments

Comments
 (0)