diff --git a/scripts/pm/dispatch-gates.data.mjs b/scripts/pm/dispatch-gates.data.mjs index eee7cbb8ede..a68a59c9dea 100644 --- a/scripts/pm/dispatch-gates.data.mjs +++ b/scripts/pm/dispatch-gates.data.mjs @@ -1573,14 +1573,14 @@ export const CHANGE_KIND_ROWS = [ ], }, { - kind: "changes the KEY SET of a spec props schema the console registry-inputs parity holds whole (the list view entry, ListViewPageProps, its own keys or the ListViewSchema shape it spreads, ElementRecordPickerPropsSchema or ElementTextInputPropsSchema: a key added, removed or renamed, read from the DIFF against the merge base)", + kind: "changes what the console registry-inputs parity holds whole of ComponentPropsMap (the map's own block list: a block added, removed or renamed; or the KEY SET of one of the 42 props schemas its blocks map to that the pin holds, the list view entry's spread ListViewSchema shape and the shared emptyProps literal included: a key added, removed or renamed), read from the DIFF against the merge base", matches: 'registry-inputs-key-set', gates: [ { name: 'pnpm --dir ui exec vitest run apps/console/src/__tests__/registry-inputs-spec-parity.test.ts', ciJob: 'Test UI', ciRunner: 'pnpm --dir ui exec vitest run', - why: "for every block ComponentPropsMap registers with declared inputs, it holds the registered inputs to the top-level keys the block's spec props schema declares, so a key added to one of those schemas reds the block's case until the registry publishes an input for it. ⚠ Measured on three of those schemas (the list view, the record picker and the text input); the rest of ComponentPropsMap is not read by this row, and a key added there still derives nothing. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by publishing the key as an input in the block's registration, or by justifying it in the test's unpublished set", + why: "it partitions ComponentPropsMap's blocks into judged, propless and ledgered, so a block added to or removed from the map reds it until the gate accounts for it; for every block registered with declared inputs it holds the registered inputs to the top-level keys the block's spec props schema declares, so a key added there reds the block's case until the registry publishes an input for it; and it holds every block ledgered as retired upstream (element:filter, element:form) or as an empty spec shape (record:approvals and the emptyProps blocks) to no authorable key, so a live key added to one of those reds it until the block is judged. Measured: a block added to the map reds it, and so does one key added to each of the 42 schemas the pin holds (the element:form, record:approvals and emptyProps ones each on its own). Three blocks the map carries stay out, each measured green on its own probe: the inline ai:suggestion shape, element:image and element:metadata_viewer (all three are in the test's EXPECTED_WITHOUT_INPUTS, which no key reaches); the four retiredComponentProps blocks are a z.never with no key set. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by publishing the key as an input in the block's registration, or by justifying it in the test's unpublished set; for a block added to or removed from the map, by judging it or ledgering it with its reason", }, ], }, @@ -1800,7 +1800,7 @@ export const CHANGE_KIND_ROWS = [ ciJob: 'Test Core', ciRunner: 'set -- pnpm turbo run test', ciSubset: 'packages/lint/src/validate-react-page-props.test.ts', - why: "it holds the chart aggregate enum's options equal to the lint rule's FUNCTIONS list, in order, so a function added to, removed from or renamed in the enum reds it until the rule's vocabulary moves with it (a reorder reds it too, and derives nothing: the set is sorted). Measured: one value added to the enum reds it. lint's vitest config loads the spec from its BUILT dist (it externalises that dist, never aliases it to source). It is a lint test, so no check family and no spec package test covers it: CI runs it only inside the Test Core shards' package test task. Its vitest config does NOT alias the spec package to source, so the test reads the BUILT spec dist and a stale dist answers green for your edit: build the closure first, pnpm --filter '@objectstack/lint^...' build . Repair by moving the rule's FUNCTIONS list", + why: "it holds the chart aggregate enum's options equal to its own FUNCTIONS table (the test's, not the rule's), in order, so a function added to, removed from or renamed in the enum reds it until that table moves with it (a reorder reds it too, and derives nothing: the set is sorted). Measured: one value added to the enum reds it. lint's vitest config loads the spec from its BUILT dist (it externalises that dist, never aliases it to source). It is a lint test, so no check family and no spec package test covers it: CI runs it only inside the Test Core shards' package test task. Its vitest config does NOT alias the spec package to source, so the test reads the BUILT spec dist and a stale dist answers green for your edit: build the closure first, pnpm --filter '@objectstack/lint^...' build . Repair by moving the test's own FUNCTIONS table", }, ], }, @@ -1813,7 +1813,7 @@ export const CHANGE_KIND_ROWS = [ ciJob: 'Test Core', ciRunner: 'set -- pnpm turbo run test', ciSubset: 'packages/objectql/src/validation/record-validator.single-value-blank.test.ts', - why: "it classifies every field type enum member the $empty table puts on the null_only arm, so a type added to the enum that lands there unclassified reds it until the validator says how a blank of it reads. Measured: one value added to the enum reds it. It is a objectql test, so no check family and no spec package test covers it: CI runs it only inside the Test Core shards' package test task. Its vitest config does NOT alias the spec package to source, so the test reads the BUILT spec dist and a stale dist answers green for your edit: build the closure first, pnpm --filter '@objectstack/objectql^...' build . Repair by classifying the type in the record validator's value-type sets", + why: "it classifies every field type enum member the $empty table puts on the null_only arm, so a type added to the enum that lands there unclassified reds it until the validator says how a blank of it reads. Measured: one value added to the enum reds it. It is a objectql test, so no check family and no spec package test covers it: CI runs it only inside the Test Core shards' package test task. Its vitest config does NOT alias the spec package to source, so the test reads the BUILT spec dist and a stale dist answers green for your edit: build the closure first, pnpm --filter '@objectstack/objectql^...' build . Repair by classifying the type in the spec's value-type sets (packages/spec/src/data/field-value.zod.ts)", }, ], }, @@ -1917,14 +1917,328 @@ export const CHANGE_KIND_ROWS = [ ], }, { - kind: 'changes the generated-artifact merge routing (a `merge=os-regen` line added, removed or edited in .gitattributes, read from the DIFF against the merge base) or edits scripts/pm/os-regen-merge.sh itself', + kind: "changes the ARM LIST of HookBodySchema (an arm added, removed or respelled) or the KEY SET of one of its two arms, ExpressionBodySchema or ScriptBodySchema, as the action inspector's script-body census holds them (a key added, removed or renamed, read from the DIFF against the merge base)", + matches: 'script-body-key-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/ActionDefaultInspector.scriptBodyLanguage-11921.test.tsx', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it holds the inspector's BODY_KEYS_BY_LANGUAGE equal to the hook body union's arms, by language and by each arm's keys, both ways, so an arm or an arm key added, removed or renamed reds it until the inspector's table moves with it. Measured: one key added to each arm reds it. A language literal renamed inside an arm (its `language` value, not a key) moves no set this row reads and derives nothing; it is a miss, not a quiet green, because the census reds on it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by moving BODY_KEYS_BY_LANGUAGE (the language's entry, and the keys the inspector writes for it)", + }, + ], + }, + { + kind: "changes the KEY SET of EndConfigSchema as the flow end-node inspector's message pin holds it (a key added, removed or renamed, read from the DIFF against the merge base)", + matches: 'end-message-key-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/FlowNodeInspector.endMessage-9336.test.tsx', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it holds the end node config's keys equal to exactly the pair the inspector edits (`outcome`, `message`), so a key added to, removed from or renamed in the schema reds it until the inspector says what it does with the key. Measured: one key added to the schema reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by deciding the key in the end-node inspector and moving the pinned pair", + }, + ], + }, + { + kind: "changes the KEY SET of EndConfigSchema as the flow end-node inspector's output-variable pin holds it (a key added, removed or renamed, read from the DIFF against the merge base)", + matches: 'end-output-variable-key-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/FlowNodeInspector.endOutputVariable-9335.test.tsx', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it holds the end node config's keys equal to the pair the inspector edits, with no room for `outputVariable`, so a key added to, removed from or renamed in the schema reds it until the pin's verdict on the end node's key surface is re-read. Measured: one key added to the schema reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by deciding the key in the end-node inspector and moving the pinned pair", + }, + ], + }, + { + kind: "changes the KEY SET of ApprovalNodeConfigSchema or DecisionConfigSchema as the flow node config panel's Chinese-label census holds them (a key added, removed or renamed, read from the DIFF against the merge base)", + matches: 'approval-config-zh-key-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/flow-node-config.zhPanel-34818.test.ts', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it serves the approval and the decision node configs' JSON Schemas through the flow config panel in zh-CN and requires every served string to read Chinese, so a key added to either schema reds it until the panel carries the key's Chinese label. Measured: one key added to each schema reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by adding the key's zh-CN label to the flow node config panel's approval or decision strings", + }, + ], + }, + { + kind: "changes InstalledPackageSourceSchema's VALUE SET as the package source column holds it (a value added, removed or renamed, read from the DIFF against the merge base)", + matches: 'package-source-value-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/packageSource-12790.test.ts', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it holds the console's PACKAGE_SOURCES equal to the installed package source enum's options, sorted, and to the `source` options on both stage branches of the served row, so a source added to, removed from or renamed in the enum reds it until the column lists it. Measured: one value added to the enum reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by adding the source to PACKAGE_SOURCES, with its label", + }, + ], + }, + { + kind: "changes ObjectAccessScopeSchema's VALUE SET as the permission matrix's record-scope pin holds it (a value added, removed or renamed, read from the DIFF against the merge base)", + matches: 'access-scope-value-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.recordScope-26187.test.tsx', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it holds the permission matrix's OBJECT_ACCESS_SCOPES equal to the object access scope enum's options, IN ORDER, so a scope added to, removed from or renamed in the enum reds it until the matrix offers it (a reorder reds it too, and derives nothing: the set is sorted). Measured: one value added to the enum reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by moving OBJECT_ACCESS_SCOPES with the enum", + }, + ], + }, + { + kind: "changes WidgetColorVariantSchema's VALUE SET as the color variant field's canonical swatch row holds it (a value added, removed or renamed, read from the DIFF against the merge base)", + matches: 'color-variant-swatch-value-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/color-variant-field.test.tsx', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it holds the field's canonical swatch row equal to the widget color variant enum's options, IN ORDER, so a token added to, removed from or renamed in the enum reds it until the field offers it (a reorder reds it too, and derives nothing: the set is sorted). Measured: one value added to the enum reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by adding the token to COLOR_VARIANTS' canonical row, in the spec's order", + }, + ], + }, + { + kind: "changes WidgetColorVariantSchema's VALUE SET as the dataset widget's accent tables hold it (a value added, removed or renamed, read from the DIFF against the merge base)", + matches: 'color-variant-accent-value-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/plugin-dashboard/src/__tests__/DatasetWidget.colorVariant.test.tsx', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it holds the dataset widget's accent class tables equal to the widget color variant enum's options, sorted, and renders every token distinguishably, so a token added to, removed from or renamed in the enum reds it until the widget has an accent for it. Measured: one value added to the enum reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by adding the token's accent classes to the widget's tables", + }, + ], + }, + { + kind: "changes the KEY SET of FieldOperatorsSchema (the filter `$` operators) as the filter condition builder's operator census holds it (a key added, removed or renamed, read from the DIFF against the merge base)", + matches: 'filter-operator-key-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/fields/src/widgets/__tests__/FilterConditionField.operators.test.ts', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it requires every `$` operator the field operator schema declares to be emitted by some builder operator, or to be named unreachable, and every emitted one to be declared, so an operator added to the schema reds it until the builder can author it. Measured: one key added to the schema reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by teaching a builder operator to emit it, or naming it in KNOWN_UNREACHABLE with the reason", + }, + ], + }, + { + kind: "changes PageComponentType's VALUE SET as the page designer's block palette holds it (a value added, removed or renamed), or the KEY SET of one record:details section entry (RecordDetailsProps.sections[], a key added, removed or renamed) as the block inspector's section editor holds it, read from the DIFF against the merge base", + matches: 'page-block-type-value-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/previews/__tests__/block-config.test.ts', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it requires every spec page block type to be offered in BLOCK_TYPE_META or excluded in PALETTE_EXCLUSIONS, so a block type added to the enum reds it until the palette decides it; and it requires an item editor in the record:details inspector for every key one sections[] entry declares, bar its deferred nine, so a key added to the section entry reds it until the inspector authors it. Measured: one value added to the enum reds it, and one key added to the section entry does. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by offering the type in BLOCK_TYPE_META (it needs a renderer) or excluding it in PALETTE_EXCLUSIONS with the reason; for a section key, by adding its item editor (or deferring it in the test with the reason)", + }, + ], + }, + { + kind: "changes PageTypeSchema's VALUE SET as the page kind node-type channel holds it (a value added, removed or renamed, read from the DIFF against the merge base)", + matches: 'page-kind-value-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/components/src/__tests__/page-kind-node-type-channel-9642.test.tsx', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it requires every page kind the enum lists to be served by PageRenderer or short-circuited by PageView's interface-mode branch, exactly once, so a kind added to the enum reds it until the component registry answers it. Measured: one value added to the enum reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by registering the kind with PageRenderer, or routing it through PageView's interface-mode branch", + }, + ], + }, + { + kind: "changes AggregationFunction's VALUE SET as the metric widget's unit table holds it (a value added, removed or renamed, read from the DIFF against the merge base)", + matches: 'aggregation-function-value-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/plugin-dashboard/src/__tests__/ObjectMetricWidget.countNotCurrency-10356.test.tsx', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it holds the metric widget's CARRIES_FIELD_UNIT keys equal to the query aggregation function enum's options, both sorted, so a function added to, removed from or renamed in the enum reds it until the widget says whether its result carries the field's unit. Measured: one value added to the enum reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by adding the function's row to CARRIES_FIELD_UNIT", + }, + ], + }, + { + kind: "changes the KEY SET of GanttConfigSchema (the list view's `gantt` block) as the list view's block-reader pin holds it (a key added, removed or renamed, read from the DIFF against the merge base)", + matches: 'list-gantt-block-key-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/plugin-list/src/__tests__/ListView.readersRetired-6152.test.tsx', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it drives every key the spec declares on the list view's gantt block through the list view and requires each to reach the generated gantt node, so a key added to the block reds it until the list view's typed-total table carries it. Measured: one key added to the schema reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by carrying the key in the list view's gantt table", + }, + ], + }, + { + kind: "changes the KEY SET of GanttConfigSchema or TimelineConfigSchema (the list view's `gantt` and `timeline` blocks) as the object view harness holds them (a key added, removed or renamed, read from the DIFF against the merge base)", + matches: 'view-gantt-timeline-key-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/plugin-view/src/__tests__/ObjectView.harness.test.tsx', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it drives every key the spec declares on the gantt and timeline blocks through the object view and requires each to reach the rendered node, so a key added to either block reds it until the object view carries it. Measured: one key added to each schema reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by carrying the key in the object view's gantt or timeline mapping", + }, + ], + }, + { + kind: "changes the KEY SET of ObjectTreePropsSchema as the object tree's spec reading holds it (a key added, removed or renamed, read from the DIFF against the merge base)", + matches: 'object-tree-props-key-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/plugin-tree/src/ObjectTree.schemaTyped-8655.test.ts', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it holds the `object-tree` entry's keys in ComponentPropsMap equal to a literal list, sorted, so a key added to, removed from or renamed in the schema reds it until the tree's verdicts are re-read against the new key. Measured: one key added to the schema reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by re-reading the tree's verdicts for the key and moving the pinned list", + }, + ], + }, + { + kind: "changes the KEY SET of ChartAxisSchema as the types chart axis config sample holds it (a key added, removed or renamed, read from the DIFF against the merge base)", + matches: 'chart-axis-config-key-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/types/src/__tests__/chart-axis-config-7690.test.ts', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it holds the keys of its FULL_AXIS sample equal to the chart axis schema's keys, sorted, so a key added to, removed from or renamed in the schema reds it until the sample (and the mirror it exercises) carries it. Measured: one key added to the schema reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by adding the key to FULL_AXIS with a value the mirror accepts", + }, + ], + }, + { + kind: "changes the KEY SET of ChartAxisSchema as the types object chart axis config sample holds it (a key added, removed or renamed, read from the DIFF against the merge base)", + matches: 'object-chart-axis-config-key-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/types/src/__tests__/object-chart-axis-config-10518.test.ts', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it holds the keys of its FULL_AXIS sample equal to the chart axis schema's keys, sorted, so a key added to, removed from or renamed in the schema reds it until the object chart sample carries it. Measured: one key added to the schema reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by adding the key to FULL_AXIS with a value the object chart mirror accepts", + }, + ], + }, + { + kind: "changes ChartAggregateFunctionSchema's VALUE SET as the types object chart aggregate list holds it (a value added, removed or renamed, read from the DIFF against the merge base)", + matches: 'chart-aggregate-legacy-value-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/types/src/__tests__/object-chart-legacy-axis-keys-retired-10608.test.ts', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it holds the object chart's aggregate function list equal to the options of the chart aggregate's `function`, which is the chart aggregate function enum, so a function added to, removed from or renamed in the enum reds it until the list moves with it. Measured: one value added to the enum reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by moving the object chart's aggregate function list", + }, + ], + }, + { + kind: "changes the KEY SET of the list view protocol as the types unmirrored-keys census holds it (ListViewShapeSchema's own keys, or ObjectListViewSchema's chain over it: a key added, removed or renamed, read from the DIFF against the merge base)", + matches: 'list-view-protocol-key-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/types/src/__tests__/object-view-unmirrored-keys-7779.test.ts', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it requires every live key of the object list view schema (the list view shape less and plus its user filters) to be declared by the ui list view mirror, so a key added to the shape reds it until the mirror declares, derives or buckets it. Measured: one key added to the shape, and one to the object list view's extension, each reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by declaring the key on the ui list view mirror, or bucketing it with its reason", + }, + ], + }, + { + kind: "changes the KEY SET of RecordApprovalsProps (ComponentPropsMap's `record:approvals` row) as the types record panel arms pin holds it (a key added, removed or renamed, read from the DIFF against the merge base)", + matches: 'record-approvals-row-key-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/types/src/__tests__/record-panels-arms-12363.test.ts', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it holds the row's keys equal to the empty list and the ui arm's bag equal to the row, so a key added to the row reds it until the arm's bag declares it and the pin's empty list moves. Measured: one key added to the schema reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by declaring the key on the arm's bag and moving the pinned row", + }, + ], + }, + { + kind: "changes the KEY SET of SelectOptionSchema as the types select option convergence pin holds it (a key added, removed or renamed, read from the DIFF against the merge base)", + matches: 'select-option-key-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/types/src/__tests__/select-option-tier1-convergence-7014.test.ts', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it holds the select option mirror's listed keys equal to the keys the spec's select option declares, so a key added to, removed from or renamed in the schema reds it until the mirror lists it. Measured: one key added to the schema reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by listing the key on the select option mirror", + }, + ], + }, + { + kind: "changes the KEY SET of UserFilterFieldSchema as the types spec-symbol parity probe path holds it (a key added, removed or renamed, read from the DIFF against the merge base)", + matches: 'user-filter-field-key-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/types/src/__tests__/spec-symbol-parity.test.ts', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it holds the user filter field mirror's keys (which follow the spec's user filter field) equal to a literal list, sorted, so a key added to, removed from or renamed in the schema reds it until the probe path's list moves with it. Measured: one key added to the schema reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by moving the pinned list, after checking the probes below it still reach the field", + }, + ], + }, + { + kind: "changes the KEY SET of TreeConfigSchema as the types tree view config readers pin holds it (a key added, removed or renamed, read from the DIFF against the merge base)", + matches: 'tree-config-key-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/types/src/__tests__/tree-view-config-readers-8253.test.ts', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it holds the tree view's reader list equal to the tree config schema's keys, both ways, so a key added to, removed from or renamed in the schema reds it until the tree view reads it. Measured: one key added to the schema reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by adding the key's reader to the tree view's list", + }, + ], + }, + { + kind: "changes the VALUE SET of one of the three marketplace taxonomy enums (business function, industry, solution type) as the i18n taxonomy label tables hold them (a value added, removed or renamed, read from the DIFF against the merge base)", + matches: 'marketplace-taxonomy-value-set', + gates: [ + { + name: 'pnpm --dir ui exec vitest run packages/i18n/src/__tests__/marketplace-taxonomy-labels-31011.test.ts', + ciJob: 'Test UI', + ciRunner: 'pnpm --dir ui exec vitest run', + why: "it holds each locale's label group keys equal to its taxonomy enum's options, so a value added to, removed from or renamed in an enum reds it until every locale labels it. Measured: one value added to each enum reds it. It is a ui test, so no package suite outside ui and no check family covers it: CI runs it only inside the Test UI shards. ui's vitest config aliases only the sdui-parser to source, so the test reads @objectstack/spec from its BUILT dist and a stale one answers for your edit: build the seven @objectstack packages the job builds first, exactly as it does: pnpm exec turbo run build --filter=@objectstack/spec... --filter=@objectstack/client... --filter=@objectstack/core... --filter=@objectstack/formula... --filter=@objectstack/lint... --filter=@objectstack/sdui-parser... --filter=@objectstack/types... . One positional file, no bare `--`, from the repo root. Repair by adding the value's label to every locale's group", + }, + ], + }, + { + kind: "changes ExplainOperationSchema's VALUE SET as the dogfood explain write-door parity table holds it (a verb added, removed or renamed in the explain operation enum, read from the DIFF against the merge base)", + matches: 'explain-door-parity-value-set', + gates: [ + { + name: 'pnpm --filter @objectstack/dogfood exec vitest run test/explain-write-door-parity.dogfood.test.ts', + ciJob: 'Dogfood Regression Gate', + ciRunner: 'node scripts/run-with-stall-guard.mjs', + ciSubset: 'packages/qa/dogfood/test/explain-write-door-parity.dogfood.test.ts', + why: "it holds the explain operation enum's options equal to the keys of its DOORS table, both sorted, and pins explain's verdict beside each door's, so a verb added to, removed from or renamed in the enum reds it until the table classifies the verb. Read, not run: the assertion is the same as plugin-security's read-absent door table, which one value added reds. It is a dogfood test, so no check family and no package test task covers it: CI runs it only inside the Dogfood Regression Gate shards, which run in the merge queue and on main, never on the PR, so its first red is a queue ejection. The dogfood suite boots the showcase app against the BUILT packages: build the closure first, pnpm --filter '@objectstack/dogfood^...' build , then run the one file, no bare `--`. Repair by adding the verb's row to DOORS, with the verdict it pins", + }, + ], + }, + { + kind: "changes ExplainOperationSchema's VALUE SET as the dogfood controlled-by-parent explain table holds it (a verb added, removed or renamed in the explain operation enum, read from the DIFF against the merge base)", + matches: 'explain-master-write-value-set', + gates: [ + { + name: 'pnpm --filter @objectstack/dogfood exec vitest run test/cbp-explain-master-write.dogfood.test.ts', + ciJob: 'Dogfood Regression Gate', + ciRunner: 'node scripts/run-with-stall-guard.mjs', + ciSubset: 'packages/qa/dogfood/test/cbp-explain-master-write.dogfood.test.ts', + why: "it holds the explain operation enum's options equal to the keys of its DOORS table, both sorted, so a verb added to, removed from or renamed in the enum reds it until the table classifies the verb against the master-detail write door. Read, not run: the assertion is the same as plugin-security's read-absent door table, which one value added reds. It is a dogfood test, so no check family and no package test task covers it: CI runs it only inside the Dogfood Regression Gate shards, which run in the merge queue and on main, never on the PR, so its first red is a queue ejection. The dogfood suite boots the showcase app against the BUILT packages: build the closure first, pnpm --filter '@objectstack/dogfood^...' build , then run the one file, no bare `--`. Repair by adding the verb's row to DOORS, with the verdict it pins", + }, + ], + }, + { + kind: 'changes the generated-artifact merge routing (a `merge=os-regen` line added, removed or edited in .gitattributes, read from the DIFF against the merge base) or edits scripts/pm/os-regen-merge.sh itself, or edits the driver table scripts/regen-artifacts.mjs that its self-test imports', matches: 'os-regen-merge-input', gates: [ { name: 'bash scripts/pm/os-regen-merge.sh --self-test', ciJob: 'Lint · repo & tooling gates', ciRunner: 'bash scripts/pm/os-regen-merge.sh', - why: "its self-test holds the script's OS_REGEN_CLASSES table equal to the `merge=os-regen` lines in .gitattributes (each routed pattern classed for step 2's merge-side selection), and pins the script's own behaviour on synthetic fixture repos, so a routing line added, removed or respelled without its table row, or an edit to the script, reds it. No check family names it: lint.yml runs it as a bare `bash … --self-test` step in the repo & tooling job, and the family discovery reads only node scripts, so a card that added one routing line learned of it a CI round later, after a fully green local ledger. It needs no build, only git and a temp dir, and runs in seconds. Repair by adding the pattern's row to OS_REGEN_CLASSES (or removing it) in the same edit", + why: "its self-test holds the script's OS_REGEN_CLASSES table equal to the `merge=os-regen` lines in .gitattributes (each routed pattern classed for step 2's merge-side selection), and pins the script's own behaviour on synthetic fixture repos, so a routing line added, removed or respelled without its table row, or an edit to the script, reds it. It also IMPORTS the driver table scripts/regen-artifacts.mjs and holds its `mixed:` rows equal to OS_REGEN_CLASSES both ways, with one NOT_DRIVER_MANAGED row and its generator present, so any edit to that table derives it too. No check family names it: lint.yml runs it as a bare `bash … --self-test` step in the repo & tooling job, and the family discovery reads only node scripts, so a card that added one routing line learned of it a CI round later, after a fully green local ledger. It needs no build, only git and a temp dir, and runs in seconds. Repair by adding the pattern's row to OS_REGEN_CLASSES (or removing it) in the same edit, and by keeping scripts/regen-artifacts.mjs's `mixed:` rows equal to those classes", }, ], }, @@ -2022,7 +2336,8 @@ export const SPEC_MIGRATION_ENTRY_ROOTS = Object.freeze([ * second `.omit()` or a `.pick()` in the manifest chain) moves the row, and a key added to a link no row reads does * too. A literal an arrow function returns is read the same way: the translation groups' row names the arrow as its * `call` (`=> ` followed by the literal's parenthesis), and an arrow re-spaced so that text no longer matches reads - * null, wide, never quiet. + * null, wide, never quiet: every `call` row's search stops at the end of its own declaration, so it cannot land on a + * later declaration's call of the same spelling (the live file has a second `=> (` arrow after this one). * * Fourteen types, the thirteen `CARD_PROPERTY_COUNTS` counts in the metadata-protocol test plus `action`, whose count * the same file pins in a case of its own; the self-test holds each type's expanded key count equal to the number its @@ -2103,7 +2418,7 @@ export const SERVED_KEY_SET_DECLARATIONS = Object.freeze([ Object.freeze({ schema: 'NavigationItemSchema', path: 'packages/spec/src/ui/app.zod.ts', declares: 'NavigationItemSchema', call: 'z.discriminatedUnion', argument: 1 }), Object.freeze({ schema: 'SeparatorNavItemSchema', path: 'packages/spec/src/ui/app.zod.ts', declares: 'SeparatorNavItemSchema', call: 'strictObject', argument: 1 }), // The per-app translation groups: TranslationDataSchema's shape is the object literal this arrow returns. `call` - // names the arrow as text followed by the literal's parenthesis, the way callArgumentStart matches any call. + // names the arrow as text followed by the literal's parenthesis, the way callArgumentAt matches any call. Object.freeze({ schema: 'appTranslationDataShape', path: 'packages/spec/src/system/translation.zod.ts', declares: 'appTranslationDataShape', call: '=> ', argument: 0 }), Object.freeze({ schema: 'BulkActionOperationSchema', path: 'packages/spec/src/ui/bulk-action.zod.ts', declares: 'BulkActionOperationSchema', call: 'z.enum', argument: 0 }), Object.freeze({ schema: 'ColumnSummarySchema', path: 'packages/spec/src/ui/view.zod.ts', declares: 'ColumnSummarySchema', call: 'z.enum', argument: 0 }), @@ -2113,6 +2428,85 @@ export const SERVED_KEY_SET_DECLARATIONS = Object.freeze([ Object.freeze({ schema: 'ReportType', path: 'packages/spec/src/ui/report.zod.ts', declares: 'ReportType', call: 'z.enum', argument: 0 }), Object.freeze({ schema: 'NotificationPositionSchema', path: 'packages/spec/src/ui/notification.zod.ts', declares: 'NotificationPositionSchema', call: 'z.enum', argument: 0 }), Object.freeze({ schema: 'NotificationTypeSchema', path: 'packages/spec/src/ui/notification.zod.ts', declares: 'NotificationTypeSchema', call: 'z.enum', argument: 0 }), + // The rest of ComponentPropsMap's props schemas, each the strict literal its declaration passes as the second argument: + // a key added to one reds the registry-inputs parity (and, for the blocks it judges, the flat-props refusal census). + Object.freeze({ schema: 'PageHeaderProps', path: 'packages/spec/src/ui/component.zod.ts', declares: 'PageHeaderProps', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'PageTabsProps', path: 'packages/spec/src/ui/component.zod.ts', declares: 'PageTabsProps', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'PageCardProps', path: 'packages/spec/src/ui/component.zod.ts', declares: 'PageCardProps', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'PageContainerProps', path: 'packages/spec/src/ui/component.zod.ts', declares: 'PageContainerProps', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'PageAccordionProps', path: 'packages/spec/src/ui/component.zod.ts', declares: 'PageAccordionProps', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'RecordDetailsProps', path: 'packages/spec/src/ui/component.zod.ts', declares: 'RecordDetailsProps', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'RecordRelatedListProps', path: 'packages/spec/src/ui/component.zod.ts', declares: 'RecordRelatedListProps', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'RecordHighlightsProps', path: 'packages/spec/src/ui/component.zod.ts', declares: 'RecordHighlightsProps', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'RecordActivityProps', path: 'packages/spec/src/ui/component.zod.ts', declares: 'RecordActivityProps', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'RecordChatterProps', path: 'packages/spec/src/ui/component.zod.ts', declares: 'RecordChatterProps', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'RecordPathProps', path: 'packages/spec/src/ui/component.zod.ts', declares: 'RecordPathProps', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'RecordReferenceRailProps', path: 'packages/spec/src/ui/component.zod.ts', declares: 'RecordReferenceRailProps', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'RecordAlertProps', path: 'packages/spec/src/ui/component.zod.ts', declares: 'RecordAlertProps', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'RecordQuickActionsProps', path: 'packages/spec/src/ui/component.zod.ts', declares: 'RecordQuickActionsProps', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'RecordHistoryProps', path: 'packages/spec/src/ui/component.zod.ts', declares: 'RecordHistoryProps', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'RecordLineItemsProps', path: 'packages/spec/src/ui/component.zod.ts', declares: 'RecordLineItemsProps', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'RecordApprovalsProps', path: 'packages/spec/src/ui/component.zod.ts', declares: 'RecordApprovalsProps', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ElementTextPropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ElementTextPropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ElementNumberPropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ElementNumberPropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ElementButtonPropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ElementButtonPropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ElementFilterPropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ElementFilterPropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ElementDefinitionListPropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ElementDefinitionListPropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ElementRepeaterPropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ElementRepeaterPropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ActionButtonPropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ActionButtonPropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ActionGroupPropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ActionGroupPropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ActionMenuPropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ActionMenuPropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ActionIconPropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ActionIconPropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ObjectGridPropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ObjectGridPropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ObjectMetricPropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ObjectMetricPropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ObjectKanbanPropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ObjectKanbanPropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ObjectCalendarPropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ObjectCalendarPropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ObjectFormPropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ObjectFormPropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ObjectMasterDetailFormPropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ObjectMasterDetailFormPropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ObjectMapPropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ObjectMapPropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ObjectGanttPropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ObjectGanttPropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ObjectTreePropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ObjectTreePropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ObjectTimelinePropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ObjectTimelinePropsSchema', call: 'strictObject', argument: 1 }), + // The ui/ re-measure (by run): the remaining schemas and enums a ui test holds whole. The list view shape is read + // twice, as the spread row above (ListViewPageProps spreads it) and as a schema a pin holds directly. + Object.freeze({ schema: 'ListViewShapeSchema', path: 'packages/spec/src/ui/view.zod.ts', declares: 'ListViewShapeSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ObjectListViewSchema', path: 'packages/spec/src/ui/view.zod.ts', declares: 'ObjectListViewSchema', call: 'extend', argument: 0 }), + Object.freeze({ schema: 'GanttConfigSchema', path: 'packages/spec/src/ui/view.zod.ts', declares: 'GanttConfigSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'TimelineConfigSchema', path: 'packages/spec/src/ui/view.zod.ts', declares: 'TimelineConfigSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'TreeConfigSchema', path: 'packages/spec/src/ui/view.zod.ts', declares: 'TreeConfigSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'UserFilterFieldSchema', path: 'packages/spec/src/ui/view.zod.ts', declares: 'UserFilterFieldSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'SelectOptionSchema', path: 'packages/spec/src/data/field.zod.ts', declares: 'SelectOptionSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'FieldOperatorsSchema', path: 'packages/spec/src/data/filter.zod.ts', declares: 'FieldOperatorsSchema', call: 'z.object', argument: 0 }), + Object.freeze({ schema: 'EndConfigSchema', path: 'packages/spec/src/automation/builtin-node-config.zod.ts', declares: 'EndConfigSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ApprovalNodeConfigSchema', path: 'packages/spec/src/automation/approval.zod.ts', declares: 'ApprovalNodeConfigSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'HookBodySchema', path: 'packages/spec/src/data/hook-body.zod.ts', declares: 'HookBodySchema', call: 'z.discriminatedUnion', argument: 1 }), + Object.freeze({ schema: 'ExpressionBodySchema', path: 'packages/spec/src/data/hook-body.zod.ts', declares: 'ExpressionBodySchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'ScriptBodySchema', path: 'packages/spec/src/data/hook-body.zod.ts', declares: 'ScriptBodySchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'PageComponentType', path: 'packages/spec/src/ui/page.zod.ts', declares: 'PageComponentType', call: 'z.enum', argument: 0 }), + Object.freeze({ schema: 'PageTypeSchema', path: 'packages/spec/src/ui/page.zod.ts', declares: 'PageTypeSchema', call: 'z.enum', argument: 0 }), + Object.freeze({ schema: 'AggregationFunction', path: 'packages/spec/src/data/query.zod.ts', declares: 'AggregationFunction', call: 'z.enum', argument: 0 }), + Object.freeze({ schema: 'WidgetColorVariantSchema', path: 'packages/spec/src/ui/dashboard.zod.ts', declares: 'WidgetColorVariantSchema', call: 'z.enum', argument: 0 }), + Object.freeze({ schema: 'ObjectAccessScopeSchema', path: 'packages/spec/src/security/permission.zod.ts', declares: 'ObjectAccessScopeSchema', call: 'z.enum', argument: 0 }), + Object.freeze({ schema: 'InstalledPackageSourceSchema', path: 'packages/spec/src/kernel/package-registry.zod.ts', declares: 'InstalledPackageSourceSchema', call: 'z.enum', argument: 0 }), + Object.freeze({ schema: 'MarketplaceBusinessFunctionSchema', path: 'packages/spec/src/marketplace/taxonomy.zod.ts', declares: 'MarketplaceBusinessFunctionSchema', call: 'z.enum', argument: 0 }), + Object.freeze({ schema: 'MarketplaceIndustrySchema', path: 'packages/spec/src/marketplace/taxonomy.zod.ts', declares: 'MarketplaceIndustrySchema', call: 'z.enum', argument: 0 }), + Object.freeze({ schema: 'MarketplaceSolutionTypeSchema', path: 'packages/spec/src/marketplace/taxonomy.zod.ts', declares: 'MarketplaceSolutionTypeSchema', call: 'z.enum', argument: 0 }), + // The registry-inputs parity's own population: ComponentPropsMap's block list (the literal after the `=`, its keys + // quoted block types), the two blocks it ledgers as retired upstream or empty that a live key reds, and the one + // literal every emptyProps block shares (a key added there gives all nine an authoring surface at once). + Object.freeze({ schema: 'ComponentPropsMap', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ComponentPropsMap', call: null, argument: 0 }), + Object.freeze({ schema: 'ElementFormPropsSchema', path: 'packages/spec/src/ui/component.zod.ts', declares: 'ElementFormPropsSchema', call: 'strictObject', argument: 1 }), + Object.freeze({ schema: 'emptyProps', path: 'packages/spec/src/ui/component.zod.ts', declares: 'emptyProps', call: 'strictObject', argument: 1 }), + // One record:details section entry: the inline strictObject in RecordDetailsProps's `sections` member. + Object.freeze({ + schema: 'RecordDetailsProps.sections', + path: 'packages/spec/src/ui/component.zod.ts', + declares: 'RecordDetailsProps', + call: 'strictObject', + argument: 1, + within: Object.freeze([Object.freeze({ member: 'sections', call: 'strictObject', argument: 1 })]), + }), + Object.freeze({ schema: 'DecisionConfigSchema', path: 'packages/spec/src/automation/schemaless-node-config.zod.ts', declares: 'DecisionConfigSchema', call: 'strictObject', argument: 1 }), ]); /** @@ -2138,9 +2532,8 @@ export const SERVED_KEY_SET_DECLARATIONS = Object.freeze([ * list) were narrowed to the assertions that compare such an enumeration whole (an equality, a count, or a filter that * must come back empty). What was READ, and so what this table claims: every such KEY-enumeration hit under * `packages/`, and under `ui/` only the files named here (an enum's `.options` held whole was not part of that search; - * the next paragraph says what of it is measured). ⚠ The rest of the `ui/` half is NOT measured (a partial review pass turned up more whole-set - * holders outside `ui/packages/types`, spec-parity files included), so this is not a census of `ui/`; #38362 carries - * the re-measure. In the class this table serves (a schema nested in a metadata type's declaration, or a served + * the next paragraph says what of it is measured). The rest of the `ui/` half was re-measured BY RUN, not by reading + * (the ui re-measure paragraph below says how and what a green there means). In the class this table serves (a schema nested in a metadata type's declaration, or a served * union's member list, held whole so a key ADDED reds it), the rows read eleven key sets and one arm count: * metadata-core's five nested reference tables (the inline grid column, the list column and its prefix and summary, the * lookupAutofill pair), metadata-protocol's four-arm `view` controls (in the property-count test and the @@ -2148,11 +2541,14 @@ export const SERVED_KEY_SET_DECLARATIONS = Object.freeze([ * dashboard widget row), the ui dashboard census of the widget options, service-datasource's pool block, the two ui * chart normalizer tests that each keep a sample over ChartAxisSchema's keys (the axis keys test and the x-axis * presentation gate, a chart config's axes), and the console index editor's fallback properties (IndexSchema's - * authorable keys, under `object.indexes[]`). Read and NOT in this table, carried by #38362: the action inspector's - * script-body census (`ActionDefaultInspector.scriptBodyLanguage-11921.test.tsx`), whose language set has no record - * to read (the two arm key sets are named declarations a row could read, left to that card with the set); and the - * TOMBSTONE sets the unauthorable-columns test holds whole (a key retired in place moves no key set, so no row here - * can derive it). The ui spec-parity battery and the whole-set pins over schemas no metadata type nests are outside + * authorable keys, under `object.indexes[]`; a live census in the self-test holds that fallback list equal to the + * IndexSchema row's keys less the retired ones). The action inspector's script-body census + * (`ActionDefaultInspector.scriptBodyLanguage-11921.test.tsx`) is rowed under the next paragraphs: its two arm key + * sets and the hook body union's arm list. ⚠ Its language literals are not a key set: a language renamed inside an + * arm's `z.literal(…)` moves no row here and derives nothing (a miss, documented, not a quiet green). NOT in this + * table: the TOMBSTONE sets the unauthorable-columns test holds whole. A key retired in place keeps its name in the + * literal and changes only its VALUE (a `retiredKey(…)` call), so no key set moves; deriving it needs a member-value + * reader, which no row here has; follow-up card #38757 carries that reader. The ui spec-parity battery and the whole-set pins over schemas no metadata type nests are outside * this class and are rowed under the next paragraph. * * The pins OUTSIDE that class, measured at e4a02bee: the non-metadata whole-set pins are read (each test's assertion @@ -2182,7 +2578,7 @@ export const SERVED_KEY_SET_DECLARATIONS = Object.freeze([ * spec-symbol probe (ColumnSummarySchema). The value-set POPULATION, measured at d64541cf over the tracked test files * outside `packages/spec`, `packages/` included, by search and then by run: every file that enumerates one of the * nine enums rowed here (its `.options`, `enumOptions(…)`, or `Object.keys` / `Object.values` of it, under any import - * alias) is 81 files. The five explain-verb files are set aside (three rowed, two dogfood), and the bulk operation, + * alias) is 81 files. The five explain-verb files are set aside (three rowed, two dogfood, both rowed too), and the bulk operation, * notification position and report type enums are enumerated only by files already rowed. Each of the other 76 was * run on the unchanged tree (all green) and again with one value added to FieldType, ChartTypeSchema, * ChartAggregateFunctionSchema, NotificationTypeSchema and ColumnSummarySchema each and the spec dist rebuilt. 22 @@ -2193,14 +2589,49 @@ export const SERVED_KEY_SET_DECLARATIONS = Object.freeze([ * table, the add-widget picker). The other 54 stayed green (two of them, the bulk operation and toaster position * pins, are rowed holders of enums the run left alone): the rest iterate the values without holding the set (a value * the code handles by default passes them). ⚠ What that green means is narrow: green FOR THE VALUE PROBED; a value of - * another shape (one the code's default does not cover) can still red a file this census left unrowed. NOT in this - * table: the two - * dogfood tests that hold the explain verbs (they run only in the queue's dogfood shards, and no gate binding here - * names that job), the rest of ComponentPropsMap's props schemas the registry-inputs parity walks (the three rowed are - * the list view entry, its own keys and the shape it spreads, the record picker and the text input), the two - * parity files whose suite reads the spec's DECLARATION files (`page-nav-misc`, `report-chart-query`: not measured, - * the probe dist was built without them), the export-NAME parities (`auth`, `share-filter-sort`, `offline-nav`), - * which compare spec export names, not a key set, and the value-set holders above. + * another shape (one the code's default does not cover) can still red a file this census left unrowed. ⚠ Both + * searches (this one and the key-enumeration one above) started from the enums and schemas that HAVE a row: a test + * that holds whole the options of an enum no row reads was searched by neither, so it is unmeasured, not absent. One + * read example: the metadata-protocol lock-resolution test holds `MetadataLockSchema.options` whole + * (`packages/metadata-protocol/src/protocol.lock-one-resolution.test.ts`), and no row here reads that enum. + * + * The ui RE-MEASURE, at cb8d8539, by run: one key (or value) added to each of 110 spec declarations (every schema or + * enum a tracked `ui/` test enumerates whole by the key-enumeration search, and the props schemas of ComponentPropsMap), + * the seven @objectstack packages the Test UI job builds rebuilt (the client without declarations in the one batch whose + * aggregation probe its types refused), and the 270 ui test files that + * import the spec and enumerate one of them run, with the probes in three batches and once on the clean tree (all + * green clean, so every red is a probe's). 46 files went red. 19 were rowed already (each derived before this + * measure, dropped with that reading; the registry-inputs parity among them, its schema list grown from three to the + * 39 props schemas a probe reds it on, and to 43 after the one-schema probes below). 24 more are rowed here, one pin each: the package source set, the zh approval + * panel, the record-scope matrix, the widget colour variant twice (the swatch field and the dataset widget accent), + * the script-body census, the end node's message and output variable, the marketplace taxonomy labels, the filter + * operator table, the page block config and the page kind channel, the metric widget's aggregation functions, the list + * view's gantt block and the object view's gantt and timeline arms, the tree props and tree config readers, the chart + * axis config twice and the legacy aggregate retirement, the list view protocol mirror, the record approvals arm, the + * select option convergence and the user filter field symbol parity. 3 are NOT rowed: `flat-props-refusal-10872` went + * red only because the probe spelled one name into the page component node AND a props schema (its cases need a key + * in both, a collision a real edit seldom makes, not a whole set); `object-gantt-properties-bag-10859-b6` went red by + * the same collision, by its failures, and was not re-probed one schema at a time; `zod-mirror-parity` pairs eight + * spec-only keys dynamically over ComponentPropsMap, which no row here attributes to one schema. ⚠ Green there means + * green FOR THE KEY PROBED. ⚠ A red file was attributed to the schema whose probe reddened it, and what ELSE it holds + * whole was not read in that pass; a batch probe can also hide a red behind an earlier one in the same loop (the + * registry parity's ledger case stops at its first failing block). The L2 review of this measure read two files that + * hold a second set, and a one-schema probe each, on the merge base's spec, settled every member the registry parity + * holds: the zh panel's case also holds DecisionConfigSchema and the block inspector's section editor one + * record:details section entry (a `within` step into RecordDetailsProps), both red on a key added and both rowed on + * their pins; the registry parity also partitions ComponentPropsMap's block list (red on a block added: the map's own + * literal is rowed), and holds the blocks it ledgers as retired upstream or as an empty spec shape to no authorable + * key, so a live key added to element:form, to record:approvals or to the literal every emptyProps block shares reds + * it (each red on its own probe, each rowed on the pin). Three of the map's blocks stay out, each green on its own + * probe: the inline ai:suggestion shape, element:image and element:metadata_viewer, all three in the test's + * EXPECTED_WITHOUT_INPUTS (registered with no inputs list, so no key reaches a direction); the four blocks whose row + * is retiredComponentProps are a z.never with no key set to read. The two parity files whose suite reads the spec's DECLARATION files + * (`page-nav-misc`, `report-chart-query`) stayed green under probes of the navigation area, app context selector, + * global filter, dashboard widget, chart type and action param schemas on a dist built with declarations: they derive + * their sets from the spec by construction. The two dogfood tests that hold the explain verbs are rowed from their + * source, not run: they run only in the queue's Dogfood Regression Gate, and that is the job their binding names. + * NOT in this table: the export-NAME parities (`auth`, `share-filter-sort`, `offline-nav`), which compare spec export + * names, not a key set. */ export const SERVED_KEY_SET_PINS = Object.freeze({ 'field-schema-key-set': Object.freeze({ types: Object.freeze(['field']), throughSpreads: true }), @@ -2242,7 +2673,19 @@ export const SERVED_KEY_SET_PINS = Object.freeze({ 'explain-door-value-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['ExplainOperationSchema']), throughSpreads: true }), 'registry-inputs-key-set': Object.freeze({ types: Object.freeze([]), - schemas: Object.freeze(['ListViewPageProps', 'ElementRecordPickerPropsSchema', 'ElementTextInputPropsSchema']), + schemas: Object.freeze([ + 'ListViewPageProps', 'ElementRecordPickerPropsSchema', 'ElementTextInputPropsSchema', 'PageHeaderProps', + 'PageTabsProps', 'PageCardProps', 'PageContainerProps', 'PageAccordionProps', 'RecordDetailsProps', + 'RecordRelatedListProps', 'RecordHighlightsProps', 'RecordActivityProps', 'RecordChatterProps', + 'RecordPathProps', 'RecordReferenceRailProps', 'RecordAlertProps', 'RecordQuickActionsProps', + 'RecordHistoryProps', 'RecordLineItemsProps', 'ElementTextPropsSchema', 'ElementNumberPropsSchema', + 'ElementButtonPropsSchema', 'ElementFilterPropsSchema', 'ElementDefinitionListPropsSchema', + 'ElementRepeaterPropsSchema', 'ActionButtonPropsSchema', 'ActionGroupPropsSchema', 'ActionMenuPropsSchema', + 'ActionIconPropsSchema', 'ObjectGridPropsSchema', 'ObjectMetricPropsSchema', 'ObjectKanbanPropsSchema', + 'ObjectCalendarPropsSchema', 'ObjectFormPropsSchema', 'ObjectMasterDetailFormPropsSchema', + 'ObjectMapPropsSchema', 'ObjectGanttPropsSchema', 'ObjectTreePropsSchema', 'ObjectTimelinePropsSchema', + 'RecordApprovalsProps', 'ElementFormPropsSchema', 'emptyProps', 'ComponentPropsMap', + ]), throughSpreads: true, }), 'nav-doc-arm-key-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['DocNavItemSchema', 'NavigationItemSchema']), throughSpreads: true }), @@ -2272,6 +2715,33 @@ export const SERVED_KEY_SET_PINS = Object.freeze({ 'field-type-inline-edit-value-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['FieldType']), throughSpreads: true }), 'notification-surfaces-value-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['NotificationTypeSchema']), throughSpreads: true }), 'chart-type-widget-picker-value-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['ChartTypeSchema']), throughSpreads: true }), + // The ui/ re-measure and the two dogfood explain holders (measured by run, or read where the job is the queue's). + 'script-body-key-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['HookBodySchema', 'ExpressionBodySchema', 'ScriptBodySchema']), throughSpreads: true }), + 'end-message-key-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['EndConfigSchema']), throughSpreads: true }), + 'end-output-variable-key-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['EndConfigSchema']), throughSpreads: true }), + 'approval-config-zh-key-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['ApprovalNodeConfigSchema', 'DecisionConfigSchema']), throughSpreads: true }), + 'package-source-value-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['InstalledPackageSourceSchema']), throughSpreads: true }), + 'access-scope-value-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['ObjectAccessScopeSchema']), throughSpreads: true }), + 'color-variant-swatch-value-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['WidgetColorVariantSchema']), throughSpreads: true }), + 'color-variant-accent-value-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['WidgetColorVariantSchema']), throughSpreads: true }), + 'filter-operator-key-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['FieldOperatorsSchema']), throughSpreads: true }), + 'page-block-type-value-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['PageComponentType', 'RecordDetailsProps.sections']), throughSpreads: true }), + 'page-kind-value-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['PageTypeSchema']), throughSpreads: true }), + 'aggregation-function-value-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['AggregationFunction']), throughSpreads: true }), + 'list-gantt-block-key-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['GanttConfigSchema']), throughSpreads: true }), + 'view-gantt-timeline-key-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['GanttConfigSchema', 'TimelineConfigSchema']), throughSpreads: true }), + 'object-tree-props-key-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['ObjectTreePropsSchema']), throughSpreads: true }), + 'chart-axis-config-key-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['ChartAxisSchema']), throughSpreads: true }), + 'object-chart-axis-config-key-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['ChartAxisSchema']), throughSpreads: true }), + 'chart-aggregate-legacy-value-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['ChartAggregateFunctionSchema']), throughSpreads: true }), + 'list-view-protocol-key-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['ListViewShapeSchema', 'ObjectListViewSchema']), throughSpreads: true }), + 'record-approvals-row-key-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['RecordApprovalsProps']), throughSpreads: true }), + 'select-option-key-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['SelectOptionSchema']), throughSpreads: true }), + 'user-filter-field-key-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['UserFilterFieldSchema']), throughSpreads: true }), + 'tree-config-key-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['TreeConfigSchema']), throughSpreads: true }), + 'marketplace-taxonomy-value-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['MarketplaceBusinessFunctionSchema', 'MarketplaceIndustrySchema', 'MarketplaceSolutionTypeSchema']), throughSpreads: true }), + 'explain-door-parity-value-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['ExplainOperationSchema']), throughSpreads: true }), + 'explain-master-write-value-set': Object.freeze({ types: Object.freeze([]), schemas: Object.freeze(['ExplainOperationSchema']), throughSpreads: true }), }); /** diff --git a/scripts/pm/dispatch-gates.mjs b/scripts/pm/dispatch-gates.mjs index 962730771ed..be8840fe9ac 100644 --- a/scripts/pm/dispatch-gates.mjs +++ b/scripts/pm/dispatch-gates.mjs @@ -12423,17 +12423,10 @@ export function objectLiteralMemberValue(masked, open, name) { } /** - * The offset where argument number `argument` (from 0) of the first `call(` at or after `at` begins (its first - * non-blank character), searched before `end`. Null when there is no such call, or it has fewer arguments. - */ -function callArgumentStart(masked, at, call, argument, end = masked.length) { - return callArgumentAt(masked, at, call, argument, end)?.start ?? null; -} - -/** - * `callArgumentStart`, with the offsets of the call itself beside it: `{ callAt, paren, start }`, `callAt` the first - * character of `call` (so `z` of `z.object`, `e` of `extend`) and `paren` its opening parenthesis, or null as that - * function answers null. + * Where argument number `argument` (from 0) of the first `call(` at or after `at` begins, searched before `end`: + * `{ callAt, paren, start }`, `start` the argument's first non-blank character, `callAt` the first character of + * `call` (so `z` of `z.object`, `e` of `extend`) and `paren` its opening parenthesis. Null when there is no such + * call before `end`, or it has fewer arguments. */ function callArgumentAt(masked, at, call, argument, end = masked.length) { const callAt = masked.indexOf(`${call}(`, at); @@ -12489,13 +12482,29 @@ export function declaredKeySet(source, row) { * `within` step's call when there are steps) and `paren` that call's opening parenthesis; both null for a row with no * `call`, whose literal follows the `=`. Null when * the declaration is not where the row says it is. The one locator `declaredKeySet` and `declaredChainLinks` share. + * The call is searched for only inside the declaration's own statement (up to its `;` at depth zero, or the next + * top-level `export` / `const` / `let` / `var` / `function` line), so a call the declaration no longer makes (an arrow + * re-spaced, a call renamed) reads null rather than the same call in the NEXT declaration of the file. */ function rowLiteral(masked, { declares, call = null, argument = 0, within = [] }) { const decl = new RegExp(`\\b(?:const|let|var)\\s+${declares}\\b[^=]*=`).exec(masked); if (!decl) return null; const at = decl.index + decl[0].length; + // The row's call is searched inside its own declaration only: up to the semicolon that ends the initializer at its + // own depth (or, unterminated, a top-level declaration that starts a later line). Unbounded, a call respelled out of + // the row's reach was found in the NEXT declaration that spells it, and its literal answered for this row. + let end = masked.length; + for (let k = at, depth = 0; k < masked.length; k++) { + const c = masked[k]; + if (c === '{' || c === '[' || c === '(') depth++; + else if (c === '}' || c === ']' || c === ')') depth--; + else if (depth === 0 && (c === ';' || (c === '\n' && /^(?:export\s|const\s|let\s|var\s|function[\s*])/.test(masked.slice(k + 1, k + 10))))) { + end = k; + break; + } + } let found; - if (call !== null) found = callArgumentAt(masked, at, call, argument); + if (call !== null) found = callArgumentAt(masked, at, call, argument, end); else { const lead = masked.slice(at).search(/\S/); found = lead < 0 ? null : { callAt: null, paren: null, start: at + lead }; diff --git a/scripts/pm/dispatch-gates.self-test.mjs b/scripts/pm/dispatch-gates.self-test.mjs index 402aa626cf9..94dbac62587 100644 --- a/scripts/pm/dispatch-gates.self-test.mjs +++ b/scripts/pm/dispatch-gates.self-test.mjs @@ -5722,6 +5722,33 @@ export function selfTest({ tier = 'full' } = {}) { 'field-type-inline-edit-value-set': 'pnpm --dir ui exec vitest run packages/plugin-detail/src/__tests__/inlineEditTypeCoverage.test.tsx', 'notification-surfaces-value-set': 'pnpm --dir ui exec vitest run packages/components/src/notifications/__tests__/notification-surfaces.test.tsx', 'chart-type-widget-picker-value-set': 'pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/previews/AddWidgetPicker.oneRegistry-26745.test.tsx', + // The ui/ re-measure (by run) and the two dogfood explain holders (read; their job runs in the merge queue). + 'script-body-key-set': 'pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/ActionDefaultInspector.scriptBodyLanguage-11921.test.tsx', + 'end-message-key-set': 'pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/FlowNodeInspector.endMessage-9336.test.tsx', + 'end-output-variable-key-set': 'pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/FlowNodeInspector.endOutputVariable-9335.test.tsx', + 'approval-config-zh-key-set': 'pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/flow-node-config.zhPanel-34818.test.ts', + 'package-source-value-set': 'pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/packageSource-12790.test.ts', + 'access-scope-value-set': 'pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.recordScope-26187.test.tsx', + 'color-variant-swatch-value-set': 'pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/color-variant-field.test.tsx', + 'color-variant-accent-value-set': 'pnpm --dir ui exec vitest run packages/plugin-dashboard/src/__tests__/DatasetWidget.colorVariant.test.tsx', + 'filter-operator-key-set': 'pnpm --dir ui exec vitest run packages/fields/src/widgets/__tests__/FilterConditionField.operators.test.ts', + 'page-block-type-value-set': 'pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/previews/__tests__/block-config.test.ts', + 'page-kind-value-set': 'pnpm --dir ui exec vitest run packages/components/src/__tests__/page-kind-node-type-channel-9642.test.tsx', + 'aggregation-function-value-set': 'pnpm --dir ui exec vitest run packages/plugin-dashboard/src/__tests__/ObjectMetricWidget.countNotCurrency-10356.test.tsx', + 'list-gantt-block-key-set': 'pnpm --dir ui exec vitest run packages/plugin-list/src/__tests__/ListView.readersRetired-6152.test.tsx', + 'view-gantt-timeline-key-set': 'pnpm --dir ui exec vitest run packages/plugin-view/src/__tests__/ObjectView.harness.test.tsx', + 'object-tree-props-key-set': 'pnpm --dir ui exec vitest run packages/plugin-tree/src/ObjectTree.schemaTyped-8655.test.ts', + 'chart-axis-config-key-set': 'pnpm --dir ui exec vitest run packages/types/src/__tests__/chart-axis-config-7690.test.ts', + 'object-chart-axis-config-key-set': 'pnpm --dir ui exec vitest run packages/types/src/__tests__/object-chart-axis-config-10518.test.ts', + 'chart-aggregate-legacy-value-set': 'pnpm --dir ui exec vitest run packages/types/src/__tests__/object-chart-legacy-axis-keys-retired-10608.test.ts', + 'list-view-protocol-key-set': 'pnpm --dir ui exec vitest run packages/types/src/__tests__/object-view-unmirrored-keys-7779.test.ts', + 'record-approvals-row-key-set': 'pnpm --dir ui exec vitest run packages/types/src/__tests__/record-panels-arms-12363.test.ts', + 'select-option-key-set': 'pnpm --dir ui exec vitest run packages/types/src/__tests__/select-option-tier1-convergence-7014.test.ts', + 'user-filter-field-key-set': 'pnpm --dir ui exec vitest run packages/types/src/__tests__/spec-symbol-parity.test.ts', + 'tree-config-key-set': 'pnpm --dir ui exec vitest run packages/types/src/__tests__/tree-view-config-readers-8253.test.ts', + 'marketplace-taxonomy-value-set': 'pnpm --dir ui exec vitest run packages/i18n/src/__tests__/marketplace-taxonomy-labels-31011.test.ts', + 'explain-door-parity-value-set': 'pnpm --filter @objectstack/dogfood exec vitest run test/explain-write-door-parity.dogfood.test.ts', + 'explain-master-write-value-set': 'pnpm --filter @objectstack/dogfood exec vitest run test/cbp-explain-master-write.dogfood.test.ts', }); // The pins outside the metadata types' nesting, and the enum value sets, by the package their test runs in. const KS_CORE_PKG = Object.freeze({ @@ -5735,20 +5762,23 @@ export function selfTest({ tier = 'full' } = {}) { 'column-summary-symbol-value-set', 'field-type-value-set', 'chart-type-dispatch-value-set', 'chart-type-renderer-value-set', 'chart-type-families-value-set', 'report-chart-value-set', 'chart-aggregate-value-set', 'notification-position-value-set', 'notification-hook-value-set', 'chart-type-declared-families-value-set', 'chart-type-routing-value-set', 'field-type-inline-edit-value-set', 'notification-surfaces-value-set', - 'chart-type-widget-picker-value-set']); + 'chart-type-widget-picker-value-set', 'script-body-key-set', 'end-message-key-set', 'end-output-variable-key-set', 'approval-config-zh-key-set', 'package-source-value-set', 'access-scope-value-set', 'color-variant-swatch-value-set', 'color-variant-accent-value-set', 'filter-operator-key-set', 'page-block-type-value-set', 'page-kind-value-set', 'aggregation-function-value-set', 'list-gantt-block-key-set', 'view-gantt-timeline-key-set', 'object-tree-props-key-set', 'chart-axis-config-key-set', 'object-chart-axis-config-key-set', 'chart-aggregate-legacy-value-set', 'list-view-protocol-key-set', 'record-approvals-row-key-set', 'select-option-key-set', 'user-filter-field-key-set', 'tree-config-key-set', 'marketplace-taxonomy-value-set']); + // The dogfood holders: one package (the dogfood suite), one job (the queue's Dogfood Regression Gate shards). + const KS_DOGFOOD = Object.freeze(['explain-door-parity-value-set', 'explain-master-write-value-set']); const KS_JOB = Object.freeze({ 'field-schema-key-set': 'Test Core', 'object-reference-key-set': 'Test Core', 'served-type-key-set': 'Test Core', 'report-inspector-key-set': 'Test UI', 'served-row-key-set': 'Test Core', 'dashboard-widget-options-key-set': 'Test UI', 'datasource-pool-key-set': 'Test Core', 'chart-axis-key-set': 'Test UI', 'chart-axis-presentation-key-set': 'Test UI', 'index-console-key-set': 'Test UI', ...Object.fromEntries(Object.keys(KS_CORE_PKG).map((k) => [k, 'Test Core'])), ...Object.fromEntries(KS_NEW_UI.map((k) => [k, 'Test UI'])), + ...Object.fromEntries(KS_DOGFOOD.map((k) => [k, 'Dogfood Regression Gate'])), }); const KS_NAMES = Object.values(KS_GATES); const ksEntry = CHANGE_KIND_GATES.filter((k) => k.gates.some((g) => KS_NAMES.includes(g.name))); const ksRows = CHANGE_KIND_ROWS.filter((r) => r.gates.some((g) => KS_NAMES.includes(g.name))); t('⭐ the pins table and the rows agree: one row per pin, named by the pin\'s key, each carrying exactly its one test, bound to its CI job', JSON.stringify(Object.keys(SERVED_KEY_SET_PINS)) === JSON.stringify(Object.keys(KS_GATES)) - && ksRows.length === 45 && ksEntry.length === 45 + && ksRows.length === 71 && ksEntry.length === 71 && ksRows.every((r) => r.gates.length === 1 && KS_GATES[r.matches] === r.gates[0].name && KS_JOB[r.matches] === r.gates[0].ciJob)); t('…and no pin names a type or a nested schema the reader has no row for (the load-time refusal\'s input is empty)', servedKeySetPinGaps().length === 0); t('CONTROL: a pin naming an undeclared type IS a gap, by pin and type', @@ -5776,8 +5806,13 @@ export function selfTest({ tier = 'full' } = {}) { && SERVED_KEY_SET_PINS['clone-flow-request-key-set'].schemas.join() === 'CloneFlowRequestSchema' && SERVED_KEY_SET_PINS['engine-option-key-set'].schemas.join() === 'BaseEngineOptionsSchema,EngineQueryOptionsSchema,EngineUpdateOptionsSchema,EngineDeleteOptionsSchema,EngineCountOptionsSchema,EngineAggregateOptionsSchema' && ['explain-verb-rows-value-set', 'explain-verb-class-value-set', 'explain-door-value-set'].every((k) => SERVED_KEY_SET_PINS[k].schemas.join() === 'ExplainOperationSchema')); - t('…and the ui spec-parity pins: three registry props schemas, the doc nav arm and the union\'s arm list on two pins, the separator arm on the editor\'s, the translation groups, and the eight enum value sets on their tests', - SERVED_KEY_SET_PINS['registry-inputs-key-set'].schemas.join() === 'ListViewPageProps,ElementRecordPickerPropsSchema,ElementTextInputPropsSchema' + t('…and the ui spec-parity pins: forty-three registry schemas (the block list, the empty-by-design and retired rows among them), every one a component.zod.ts row, the doc nav arm and the union\'s arm list on two pins, the separator arm on the editor\'s, the translation groups, and the eight enum value sets on their tests', + SERVED_KEY_SET_PINS['registry-inputs-key-set'].schemas.length === 43 + && SERVED_KEY_SET_PINS['registry-inputs-key-set'].schemas.slice(0, 3).join() === 'ListViewPageProps,ElementRecordPickerPropsSchema,ElementTextInputPropsSchema' + && SERVED_KEY_SET_PINS['registry-inputs-key-set'].schemas.slice(-4).join() === 'RecordApprovalsProps,ElementFormPropsSchema,emptyProps,ComponentPropsMap' + && SERVED_KEY_SET_PINS['approval-config-zh-key-set'].schemas.join() === 'ApprovalNodeConfigSchema,DecisionConfigSchema' + && SERVED_KEY_SET_PINS['page-block-type-value-set'].schemas.join() === 'PageComponentType,RecordDetailsProps.sections' + && SERVED_KEY_SET_PINS['registry-inputs-key-set'].schemas.every((n) => SERVED_KEY_SET_DECLARATIONS.find((d) => d.schema === n)?.path === 'packages/spec/src/ui/component.zod.ts') && SERVED_KEY_SET_PINS['nav-doc-arm-key-set'].schemas.join() === 'DocNavItemSchema,NavigationItemSchema' && SERVED_KEY_SET_PINS['nav-target-key-set'].schemas.join() === 'DocNavItemSchema,NavigationItemSchema,SeparatorNavItemSchema' && SERVED_KEY_SET_PINS['translation-groups-key-set'].schemas.join() === 'appTranslationDataShape' @@ -5793,7 +5828,7 @@ export function selfTest({ tier = 'full' } = {}) { && SERVED_KEY_SET_PINS['chart-aggregate-value-set'].schemas.join() === 'ChartAggregateFunctionSchema' && SERVED_KEY_SET_PINS['notification-position-value-set'].schemas.join() === 'NotificationPositionSchema' && SERVED_KEY_SET_PINS['notification-hook-value-set'].schemas.join() === 'NotificationTypeSchema,NotificationPositionSchema' - && [...Object.keys(KS_CORE_PKG), ...KS_NEW_UI].every((k) => SERVED_KEY_SET_PINS[k].types.length === 0)); + && [...Object.keys(KS_CORE_PKG), ...KS_NEW_UI, ...KS_DOGFOOD].every((k) => SERVED_KEY_SET_PINS[k].types.length === 0)); t('…and the census holders: five FieldType holders, two ChartTypeSchema pins and the picker, the lint aggregate list, the notification surfaces table', ['field-type-string-width-value-set', 'field-type-blank-arm-value-set', 'field-type-audit-chain-value-set', 'field-type-audit-rules-value-set', 'field-type-aggregate-refusal-value-set', 'field-type-inline-edit-value-set'].every((k) => SERVED_KEY_SET_PINS[k].schemas.join() === 'FieldType') @@ -5858,7 +5893,7 @@ export function selfTest({ tier = 'full' } = {}) { const FK_PAIR_MEMBER = " lookupAutofill: z.array(strictObject({ surface: 'this pair' }, {\n target: z.string(),\n source: z.string(),\n })).min(1).optional(),"; const FK_GRID_DECL = "export const InlineGridColumnSchema = lazySchema(() => strictObject({ surface: 'this inline grid column' }, {\n name: z.string(),\n width: z.number().optional(),\n}));\n"; // …and the FieldType enum the field-type pin reads, declared the same on both sides unless an edit says otherwise. - const FK_ENUM_DECL = "export const FieldType = z.enum([\n 'text',\n 'number',\n]);\n"; + const FK_ENUM_DECL = "export const FieldType = z.enum([\n 'text',\n 'number',\n]);\nexport const SelectOptionSchema = lazySchema(() => strictObject({ surface: 'this option' }, {\n label: z.string(),\n value: z.string(),\n}));\n"; const fkSrc = (shape, opts = "surface: 'this field', guidance: { columnName: 'removed' }", grid = FK_GRID_DECL) => `import { z } from 'zod';\n${FK_ENUM_DECL}${grid}export const FieldSchema = lazySchema(() => {\n const base = strictObject({ ${opts} }, {\n${shape}\n });\n return base.superRefine((f, ctx) => { ctx.addIssue({ code: 'custom', path: ['x'] }); });\n});\n`; const FK_SHAPE = ` name: z.string().describe('Machine name'),\n type: FieldTypeSchema,\n${FK_PAIR_MEMBER}\n ...MetadataProtectionFields,`; @@ -5876,7 +5911,7 @@ export function selfTest({ tier = 'full' } = {}) { t('…a bare literal row reads the literal after the binding', JSON.stringify(declaredKeySet('export const MetadataProtectionFields = {\n _lock: x,\n _provenance: y,\n};', FK_PROT)) === JSON.stringify(['_lock', '_provenance'])); t('…a factory row reads the literal its arrow body calls with (action\'s `actionObject`)', JSON.stringify(declaredKeySet("const actionObject = () => strictObject({ surface: 'this action' }, {\n name: z.string(),\n ...OverrideDeclarationFields,\n});", ksRow('action'))) === JSON.stringify(['...OverrideDeclarationFields', 'name'])); - t('…and null where the declaration is not where the row says', declaredKeySet(fkSrc(" name: z.string(),", undefined, '').replace('strictObject(', 'z.object('), FK_FIELD) === null + t('…and null where the declaration is not where the row says', declaredKeySet(fkSrc(" name: z.string(),", undefined, '').replace('const base = strictObject(', 'const base = z.object('), FK_FIELD) === null && declaredKeySet('export const Other = {};', FK_PROT) === null); // The predicate, over injected base and head blobs: field's own row first, every edit shape. const PIN = SERVED_KEY_SET_PINS; @@ -5950,7 +5985,13 @@ export function selfTest({ tier = 'full' } = {}) { ? `export const ${row.declares} = {\n${shape}\n} as const;\n` : row.call === 'z.object' ? `export const ${row.declares} = lazySchema(() => z.object({\n${shape}\n}));\n` - : `export const ${row.declares} = lazySchema(() => strictObject({ surface: 'this ${row.schema}' }, {\n${shape}\n}));\n`); + : `export const ${row.declares} = lazySchema(() => strictObject({ surface: 'this ${row.schema}' }, {\n${shape}${ksWithinOf(row).map((w) => `\n${w.within.map((st) => ` ${st.member}: ${st.call}({ surface: 'inner' }, {\n a: z.string(),\n }),`).join('\n')}`).join('')}\n}));\n`); + // The within rows that read into a plain schema row's own declaration (one record:details section entry, inside + // RecordDetailsProps): the plain row renders their member, and the two render as ONE declaration. + function ksWithinOf(row) { + return row.within !== undefined || row.schema === undefined ? [] : SERVED_KEY_SET_DECLARATIONS.filter((w) => w.within !== undefined && w !== row + && w.path === row.path && w.declares === row.declares && SERVED_KEY_SET_DECLARATIONS.every((t) => t.type === undefined || t.declares !== w.declares)); + } const ksTypeDeclares = new Set(SERVED_KEY_SET_DECLARATIONS.filter((d) => d.type !== undefined).map((d) => d.declares)); // A chained declaration renders once (from its first row), and none of it when `except` is one of its rows (the // caller renders the whole declaration with that row's shape); a spread row declared beside a schema renders too. @@ -5958,6 +5999,11 @@ export function selfTest({ tier = 'full' } = {}) { .filter((d) => (d.schema !== undefined || (d.spread !== undefined && d.path !== FK_PROT.path && d.path !== KS_OVR.path)) && d.path === path && d !== except && !(d.within !== undefined && ksTypeDeclares.has(d.declares)) && !(except !== null && except.declares === d.declares && ksChainRows(except).includes(d)) + // One declaration read by two rows (the list view shape: a spread row, and a schema a pin holds) renders once: + // from its schema row, and not at all when either row is the caller's own. + && !(except !== null && except.declares === d.declares && except.path === d.path && except.call === d.call) + && !(d.spread !== undefined && SERVED_KEY_SET_DECLARATIONS.some((o) => o.schema !== undefined && o.path === d.path && o.declares === d.declares)) + && !(d.within !== undefined && SERVED_KEY_SET_DECLARATIONS.some((o) => ksWithinOf(o).includes(d))) && !(ksChainRows(d).length > 1 && ksChainRows(d)[0] !== d)) .map((d) => ksSchemaSrc(d)).join(''); const KS_SHAPE = ` name: z.string(),\n label: z.string(),\n${FK_PAIR_MEMBER}\n ...MetadataProtectionFields,\n ...OverrideDeclarationFields,`; @@ -5973,7 +6019,7 @@ export function selfTest({ tier = 'full' } = {}) { 'chart-axis-key-set': ['ChartAxisSchema'], 'chart-axis-presentation-key-set': ['ChartAxisSchema'], 'index-console-key-set': ['IndexSchema'], - ...Object.fromEntries([...Object.keys(KS_CORE_PKG), ...KS_NEW_UI].map((k) => [k, [...PIN[k].schemas]])), + ...Object.fromEntries([...Object.keys(KS_CORE_PKG), ...KS_NEW_UI, ...KS_DOGFOOD].map((k) => [k, [...PIN[k].schemas]])), }); for (const row of SERVED_KEY_SET_DECLARATIONS.filter((d) => d.type !== undefined)) { const io = fkIo(ksTypeSrc(row, KS_SHAPE_ADDED) + ksSiblings(row.path), ksTypeSrc(row, KS_SHAPE) + ksSiblings(row.path)); @@ -5984,8 +6030,13 @@ export function selfTest({ tier = 'full' } = {}) { Object.values(PIN).every((pin) => !changesServedKeySet(row.path, pin, fkIo(ksTypeSrc(row, KS_SHAPE.replace('z.string(),', "z.string().describe('the name'),")) + ksSiblings(row.path), ksTypeSrc(row, KS_SHAPE) + ksSiblings(row.path))))); } // Each nested row likewise: a key added to it (its file's type, if any, and every sibling unchanged) derives exactly - // the pins that hold it, and a describe() inside it derives none. - for (const row of SERVED_KEY_SET_DECLARATIONS.filter((d) => d.schema !== undefined)) { + // the pins that hold it, and a describe() inside it derives none. A declaration a spread row also reads (the list view + // shape) is a spread member too: who spreads it lives in another file this one-file world cannot read, so the engine + // fires every pin held there; its own cases below give it the whole world (the list view entry spreading it or not). + const ksSpreadShared = (d) => SERVED_KEY_SET_DECLARATIONS.some((o) => o.spread !== undefined && o.path === d.path && o.declares === d.declares); + t('…exactly one nested row is also a spread row\'s declaration, and it is the list view shape', + SERVED_KEY_SET_DECLARATIONS.filter((d) => d.schema !== undefined && ksSpreadShared(d)).map((d) => d.schema).join() === 'ListViewShapeSchema'); + for (const row of SERVED_KEY_SET_DECLARATIONS.filter((d) => d.schema !== undefined && !ksSpreadShared(d))) { const typeRow = SERVED_KEY_SET_DECLARATIONS.find((d) => d.type !== undefined && d.path === row.path); const typeShape = (pair) => (row.within !== undefined && typeRow?.declares === row.declares ? KS_SHAPE.replace(FK_PAIR_MEMBER, pair) : KS_SHAPE); @@ -6090,7 +6141,9 @@ export function selfTest({ tier = 'full' } = {}) { const typeRow = SERVED_KEY_SET_DECLARATIONS.find((d) => d.type !== undefined && d.path === path); const parts = SERVED_KEY_SET_DECLARATIONS .filter((d) => (d.schema !== undefined || (d.spread !== undefined && d.path !== FK_PROT.path && d.path !== KS_OVR.path)) && d.path === path - && !(d.within !== undefined && ksTypeDeclares.has(d.declares)) && !(ksChainRows(d).length > 1 && ksChainRows(d)[0] !== d)) + && !(d.within !== undefined && ksTypeDeclares.has(d.declares)) && !(ksChainRows(d).length > 1 && ksChainRows(d)[0] !== d) + && !(d.spread !== undefined && SERVED_KEY_SET_DECLARATIONS.some((o) => o.schema !== undefined && o.path === d.path && o.declares === d.declares)) + && !(d.within !== undefined && SERVED_KEY_SET_DECLARATIONS.some((o) => ksWithinOf(o).includes(d)))) .map((d) => (ksChainRows(d).length > 1 ? ksChained(ksChainRows(d), Object.fromEntries(ksChainRows(d).filter((r) => bumped.includes(r.schema)).map((r) => [r.schema, KS_BUMP]))) : ksSchemaSrc(d, bumped.includes(d.schema) ? KS_BUMP : undefined))); @@ -6100,21 +6153,29 @@ export function selfTest({ tier = 'full' } = {}) { const path = ksRow(schemas[0]).path; return [path, [ksRender(path, schemas, typeShape), ksRender(path)]]; }; - const ksBothIo = ksIoOf(Object.fromEntries([ - [FK_PATH, [FK_EDITS['a key added'][0].replace(" 'number',", " 'number',\n 'email',"), FK_BASE]], + // field's file grows its type list and its select option's keys by one; every other declaring file grows the named + // rows of it by one, whole-file (several rows of one file move in one edit). + const KS_BUMPS = [['ReportType'], ['PageComponentSchema', 'PageComponentType', 'PageTypeSchema'], ['DashboardWidgetOptionsSchema', 'WidgetColorVariantSchema'], + ['ChartAxisSchema', 'ChartTypeSchema', 'ChartAggregateFunctionSchema'], ['TemplateManifestSchema'], ['EmailServiceConfigSchema'], ['CloneFlowRequestSchema'], + ['BaseEngineOptionsSchema'], ['ExplainOperationSchema'], ['ColumnSummarySchema', 'ObjectListViewSchema', 'GanttConfigSchema', 'TimelineConfigSchema', 'TreeConfigSchema', 'UserFilterFieldSchema'], + ['ListViewPageProps', 'RecordApprovalsProps', 'ObjectTreePropsSchema'], ['DocNavItemSchema', 'NavigationItemSchema'], ['BulkActionOperationSchema'], + ['NotificationPositionSchema', 'NotificationTypeSchema'], ['appTranslationDataShape'], ['ScriptBodySchema'], ['EndConfigSchema'], ['ApprovalNodeConfigSchema'], + ['InstalledPackageSourceSchema'], ['ObjectAccessScopeSchema'], ['FieldOperatorsSchema'], ['AggregationFunction'], ['MarketplaceBusinessFunctionSchema']]; + const ksByPath = Object.fromEntries([ + [FK_PATH, [FK_EDITS['a key added'][0].replace(" 'number',", " 'number',\n 'email',").replace(' value: z.string(),\n}));', ' value: z.string(),\n color: z.string(),\n}));'), FK_BASE]], [REPORT.path, [ksRender(REPORT.path, ['ReportType'], KS_SHAPE_ADDED), ksRender(REPORT.path)]], - ksNestedEdit('PageComponentSchema'), ksNestedEdit('DashboardWidgetOptionsSchema'), ksNestedEdit('DatasourceSchema.pool'), - ksBumped(['ChartAxisSchema', 'ChartTypeSchema', 'ChartAggregateFunctionSchema']), ksNestedEdit('IndexSchema'), - ksBumped(['TemplateManifestSchema']), ksBumped(['EmailServiceConfigSchema']), ksBumped(['CloneFlowRequestSchema']), ksBumped(['BaseEngineOptionsSchema']), - ksBumped(['ExplainOperationSchema']), ksBumped(['ColumnSummarySchema']), ksBumped(['ListViewPageProps']), ksBumped(['DocNavItemSchema', 'NavigationItemSchema']), - ksBumped(['BulkActionOperationSchema']), ksBumped(['NotificationPositionSchema', 'NotificationTypeSchema']), ksBumped(['appTranslationDataShape']), - ])); + ksNestedEdit('DatasourceSchema.pool'), ksNestedEdit('IndexSchema'), + ...KS_BUMPS.slice(1).map((names) => ksBumped(names)), + ]); + t('the union world moves one edit per declaring file, none twice', Object.keys(ksByPath).length === KS_BUMPS.length + 3 + && new Set(KS_BUMPS.slice(1).map((names) => ksRow(names[0]).path)).size === KS_BUMPS.length - 1 + && KS_BUMPS.every((names) => names.every((n) => ksRow(n).path === ksRow(names[0]).path))); + t('…and field\'s edit grows both its type list and its select option', /'email',/.test(ksByPath[FK_PATH][0]) && /color: z\.string\(\),/.test(ksByPath[FK_PATH][0])); + const ksBothIo = ksIoOf(ksByPath); const ksBound = ksEntry.map((k) => ({ ...k, matches: (p) => changesServedKeySet(p, PIN[ksRows.find((r) => r.kind === k.kind).matches], ksBothIo) })); - const ksPaths = [FK_PATH, REPORT.path, ...['PageComponentSchema', 'DashboardWidgetOptionsSchema', 'DatasourceSchema.pool', 'ChartAxisSchema', 'IndexSchema', - 'TemplateManifestSchema', 'EmailServiceConfigSchema', 'CloneFlowRequestSchema', 'BaseEngineOptionsSchema', 'ExplainOperationSchema', 'ColumnSummarySchema', - 'ListViewPageProps', 'DocNavItemSchema', 'BulkActionOperationSchema', 'NotificationPositionSchema', 'appTranslationDataShape'].map((n) => ksRow(n).path)]; + const ksPaths = Object.keys(ksByPath); const ksLines = changeKindLines(ksPaths, ksResolved, ksBound); - t('a key or value added in each declaring file renders all forty-five pins runnably, anchored on the delimiter', KS_NAMES.every((n) => ksLines.some((l) => l.includes(`- ${n} —`)))); + t('a key or value added in each declaring file renders all seventy-one pins runnably, anchored on the delimiter', KS_NAMES.every((n) => ksLines.some((l) => l.includes(`- ${n} —`)))); t('…each line states its build prerequisite as measured: none for driver-sql, the closure build for the four that read the spec dist, the job\'s seven-package build for the five ui tests', ksLines.some((l) => l.includes(KS_GATES['field-schema-key-set']) && /needs NO build/.test(l)) && ksLines.some((l) => l.includes(KS_GATES['object-reference-key-set']) && l.includes("pnpm --filter '@objectstack/metadata-core^...' build")) @@ -6122,19 +6183,20 @@ export function selfTest({ tier = 'full' } = {}) { && ksLines.some((l) => l.includes(KS_GATES['served-row-key-set']) && l.includes("pnpm --filter '@objectstack/metadata-protocol^...' build")) && ksLines.some((l) => l.includes(KS_GATES['datasource-pool-key-set']) && l.includes("pnpm --filter '@objectstack/service-datasource^...' build")) && ['report-inspector-key-set', 'dashboard-widget-options-key-set', 'chart-axis-key-set', 'chart-axis-presentation-key-set', 'index-console-key-set'].every((k) => ksLines.some((l) => l.includes(KS_GATES[k]) && /seven @objectstack packages/.test(l) && l.includes('--filter=@objectstack/sdui-parser...')))); - t('…and the new pins state theirs: the package closure build for the fifteen package tests, the job\'s seven-package build for the twenty ui tests', + t('…and the new pins state theirs: the package closure build for the fifteen package tests, the job\'s seven-package build for the forty-four ui tests, the dogfood closure build for the two dogfood tests', Object.entries(KS_CORE_PKG).every(([k, pkg]) => ksLines.some((l) => l.includes(KS_GATES[k]) && l.includes(`pnpm --filter '@objectstack/${pkg}^...' build`))) - && KS_NEW_UI.every((k) => ksLines.some((l) => l.includes(KS_GATES[k]) && /seven @objectstack packages/.test(l) && l.includes('--filter=@objectstack/sdui-parser...')))); - t('…and carries no tracker number in the text a dev is shown', ksLines.length === 90 && ksLines.every((l) => !/#\d{4,5}\b/.test(l))); + && KS_NEW_UI.every((k) => ksLines.some((l) => l.includes(KS_GATES[k]) && /seven @objectstack packages/.test(l) && l.includes('--filter=@objectstack/sdui-parser...'))) + && KS_DOGFOOD.every((k) => ksLines.some((l) => l.includes(KS_GATES[k]) && l.includes("pnpm --filter '@objectstack/dogfood^...' build")))); + t('…and carries no tracker number in the text a dev is shown', ksLines.length === 142 && ksLines.every((l) => !/#\d{4,5}\b/.test(l))); const ksDerived = commandsFor({ kindGroups: changeKindGates(ksPaths, ksResolved, ksBound) }); - t('the runnable union carries all forty-five', KS_NAMES.every((n) => ksDerived.includes(n))); + t('the runnable union carries all seventy-one', KS_NAMES.every((n) => ksDerived.includes(n))); t('CONTROL: a describe-only edit renders none of them', changeKindLines([FK_PATH], ksResolved, ksEntry.map((k) => ({ ...k, matches: (p) => changesServedKeySet(p, PIN[ksRows.find((r) => r.kind === k.kind).matches], fkIo(FK_EDITS['a describe() reworded'][0], FK_BASE)) }))).length === 0); for (const gate of KS_NAMES) { const without = runReconciliation({ derived: ksDerived, record: parseRunRecord(ksDerived.filter((c) => c !== gate).map((c) => `${c} :: exit 0`).join('\n')) }); - t(`⭐ a run record carrying every derived command BUT ${gate.split(' ')[2]}'s pin is NOT ok, and names it unrun`, !without.ok && without.unrun.some((u) => u.command === gate)); + t(`⭐ a run record carrying every derived command BUT ${gate.split(' ').at(-1)}'s pin is NOT ok, and names it unrun`, !without.ok && without.unrun.some((u) => u.command === gate)); } - t('CONTROL: the same record WITH all forty-five is ok', runReconciliation({ derived: ksDerived, record: parseRunRecord(ksDerived.map((c) => `${c} :: exit 0`).join('\n')) }).ok); + t('CONTROL: the same record WITH all seventy-one is ok', runReconciliation({ derived: ksDerived, record: parseRunRecord(ksDerived.map((c) => `${c} :: exit 0`).join('\n')) }).ok); const ksStale = changeKindLines(ksPaths, () => null, ksBound); t('an unresolvable binding renders each pin STALE, naming the job and what it lost (the file for a Test Core subset, the runner for the ui one)', ksEntry.every((k) => k.gates.every((g) => ksStale.filter((l) => l.includes(`⚠ ${g.name}: STALE`) && l.includes(`job named '${g.ciJob}…'`) @@ -6152,7 +6214,11 @@ export function selfTest({ tier = 'full' } = {}) { })()); } const liveKs = new Map(SERVED_KEY_SET_DECLARATIONS.map((d) => [d, declaredKeySet(readFileSync(nodePath.join(ROOT, d.path), 'utf8'), d)])); - t(`⭐ LIVE: every declaration row reads on this tree (${liveKs.size})`, [...liveKs.values()].every((keys) => Array.isArray(keys) && keys.length > 0)); + // A row whose literal is empty by design (`record:approvals` accepts no key, and its pin holds exactly that) reads + // an empty set, never null: its pin reds on the first key added, so an empty reading is the reading it holds. + const KS_EMPTY_BY_DESIGN = Object.freeze(['RecordApprovalsProps', 'emptyProps']); + t(`⭐ LIVE: every declaration row reads on this tree (${liveKs.size}), non-empty but for the empty-by-design ones`, + [...liveKs.entries()].every(([d, keys]) => Array.isArray(keys) && (keys.length > 0 || KS_EMPTY_BY_DESIGN.includes(d.schema)))); const liveSpreadRows = new Map(SERVED_KEY_SET_DECLARATIONS.filter((d) => d.spread !== undefined).map((d) => [`...${d.spread}`, liveKs.get(d) ?? []])); const liveExpanded = (type) => { const own = liveKs.get(ksRow(type)) ?? []; @@ -6248,18 +6314,56 @@ export function selfTest({ tier = 'full' } = {}) { t(`⭐ LIVE census: ChartAxisSchema's keys less \`field\` (${liveSet('ChartAxisSchema').filter((k) => k !== 'field').length}) equal the x-axis presentation gate's SAMPLE keys (${axisXSample.length}), which its own test holds equal to the schema less \`field\``, axisXSample.length > 3 && JSON.stringify(liveSet('ChartAxisSchema').filter((k) => k !== 'field')) === JSON.stringify(axisXSample) && /Object\.keys\(SpecChartAxisSchema\.shape\)\s*\.filter\(\(key\) => key !== 'field'\)/.test(AXIS_X_PIN)); - t('⭐ a key added to ChartAxisSchema derives BOTH chart normalizer pins, and a describe() inside it neither', + t('⭐ a key added to ChartAxisSchema derives BOTH chart normalizer pins and both axis-config holders, and a describe() inside it none', (() => { const row = ksRow('ChartAxisSchema'); // The rows declared beside it in chart.zod.ts (the chart type and aggregate enums) unchanged on both sides. const sib = ksSiblings(row.path, row); const io = fkIo(sib + ksSchemaSrc(row, ' field: z.string(),\n title: z.string(),\n ticks: z.number(),'), sib + ksSchemaSrc(row, ' field: z.string(),\n title: z.string(),')); const quiet = fkIo(sib + ksSchemaSrc(row, " field: z.string(),\n title: z.string().describe('t'),"), sib + ksSchemaSrc(row, ' field: z.string(),\n title: z.string(),')); - return ksFired(row.path, io).join() === 'chart-axis-key-set,chart-axis-presentation-key-set' && ksFired(row.path, quiet).length === 0; + return ksFired(row.path, io).join() === 'chart-axis-key-set,chart-axis-presentation-key-set,chart-axis-config-key-set,object-chart-axis-config-key-set' && ksFired(row.path, quiet).length === 0; })()); const INDEX_PIN = maskComments(readFileSync(nodePath.join(ROOT, 'ui/packages/app-shell/src/views/metadata-admin/EmbeddedItemEditor.indexFallback.test.tsx'), 'utf8')); t('⭐ LIVE: the console index pin still enumerates IndexSchema\'s shape whole, and the reader sees a non-empty set', /Object\.keys\(IndexSchema\.shape\)/.test(INDEX_PIN) && liveSet('IndexSchema').length > 0); + // The console's OWN index property list, read from FALLBACK_SCHEMAS (`index` → `schema` → `properties`), held equal + // to IndexSchema's authorable keys: its keys less the ones whose value is a `retiredKey(` tombstone. The pin above + // only shows the test enumerates the shape; this holds the two lists themselves equal on this tree. + const EDITOR_SRC = readFileSync(nodePath.join(ROOT, 'ui/packages/app-shell/src/views/metadata-admin/EmbeddedItemEditor.tsx'), 'utf8'); + const editorIndexProps = (() => { + const masked = maskCommentsAndLiterals(EDITOR_SRC); + const decl = /\bconst FALLBACK_SCHEMAS\b[^=]*=\s*/.exec(masked); + if (!decl) return null; + let open = decl.index + decl[0].length; + for (const member of ['index', 'schema', 'properties']) { + const span = objectLiteralMemberValue(masked, open, member); + if (span === null) return null; + open = masked.indexOf('{', span.start); + if (open < 0 || open >= span.end) return null; + } + const members = objectLiteralMembers(EDITOR_SRC, open, masked); + return members === null ? null : [...members].sort(); + })(); + const INDEX_SRC = maskComments(readFileSync(nodePath.join(ROOT, ksRow('IndexSchema').path), 'utf8')); + const indexAuthorable = liveSet('IndexSchema').filter((k) => !new RegExp(`\\b${k}\\s*:\\s*retiredKey\\(`).test(INDEX_SRC)); + t(`⭐ LIVE census: the console index editor's own property list (${editorIndexProps?.length ?? 'unread'}) equals IndexSchema's authorable keys (${indexAuthorable.length})`, + Array.isArray(editorIndexProps) && editorIndexProps.length > 1 && JSON.stringify(editorIndexProps) === JSON.stringify(indexAuthorable)); + t('CONTROL: the editor reader reads a nested properties literal, and null where a step is missing', + (() => { + const read = (src) => { + const masked = maskCommentsAndLiterals(src); + let open = src.indexOf('{'); + for (const member of ['index', 'schema', 'properties']) { + const span = objectLiteralMemberValue(masked, open, member); + if (span === null) return null; + open = masked.indexOf('{', span.start); + if (open < 0 || open >= span.end) return null; + } + return objectLiteralMembers(src, open, masked); + }; + return JSON.stringify(read("{ index: { schema: { type: 'object', properties: { name: {}, fields: { items: {} } } } } }")) === JSON.stringify(['name', 'fields']) + && read("{ index: { schema: { type: 'object' } } }") === null; + })()); // The `view` row reads the member record because the union maps the branch list over it; the two lists agree. const VIEW_SRC = maskComments(readFileSync(nodePath.join(ROOT, ksRow('VIEW_METADATA_MEMBERS').path), 'utf8')); const viewBranches = [...(/VIEW_METADATA_BRANCHES = \[([^\]]*)\]/.exec(VIEW_SRC)?.[1] ?? '').matchAll(/'([^']+)'/g)].map((m) => m[1]).sort(); @@ -6276,7 +6380,7 @@ export function selfTest({ tier = 'full' } = {}) { 'explain-verb-rows-value-set': /\[\.\.\.ExplainOperationSchema\.options\]\.sort\(\)\)\.toEqual\(Object\.keys\(VERB_ROWS\)/, 'explain-verb-class-value-set': /\[\.\.\.ExplainOperationSchema\.options\]\.sort\(\)\)\.toEqual\(Object\.keys\(VERB_CLASS\)/, 'explain-door-value-set': /\[\.\.\.ExplainOperationSchema\.options\]\.sort\(\)\)\.toEqual\(Object\.keys\(DOORS\)/, - 'registry-inputs-key-set': /Object\.keys\(ComponentPropsMap\)/, + 'registry-inputs-key-set': /const specBlocks = Object\.keys\(ComponentPropsMap\)\.sort\(\)[\s\S]*if \(reason\.startsWith\('RETIRED UPSTREAM'\)\)[\s\S]*if \(reason\.startsWith\('EMPTY SPEC SHAPE'\)\)/, 'nav-doc-arm-key-set': /Object\.keys\(SpecDocNavItemSchema\.shape\)[\s\S]*expect\(specDiscriminator\(\)\)\.toEqual\(TRIAGED_NAV_TYPES\)|expect\(specDiscriminator\(\)\)\.toEqual\(TRIAGED_NAV_TYPES\)[\s\S]*Object\.keys\(SpecDocNavItemSchema\.shape\)/, 'nav-target-key-set': /expect\(\[\.\.\.NAV_ENTRY_TYPES\]\.sort\(\)\)\.toEqual\(\[\.\.\.SPEC_TYPES\]\.sort\(\)\)[\s\S]*for \(const key of SPEC_BASE_KEYS\) \{[\s\S]*expect\(BASE_VALUES\)\.toHaveProperty\(key\)[\s\S]*SPEC_MEMBERS\.find\(\(m\) => m\.type === 'separator'\)!\.keys[\s\S]*expect\(Object\.keys\(retyped\)\.sort\(\)\)\.toEqual\(\[\.\.\.separatorKeys\]\.sort\(\)\)/, 'translation-groups-key-set': /const GROUPS = Object\.keys\(TranslationDataSchema\.shape\)[\s\S]*expect\(Object\.keys\(ONE_ENTRY\)\.sort\(\)\)\.toEqual\(\[\.\.\.GROUPS\]\.sort\(\)\)/, @@ -6304,11 +6408,53 @@ export function selfTest({ tier = 'full' } = {}) { 'notification-surfaces-value-set': /enumOptions\(NotificationTypeSchema\)[\s\S]*expect\(\[\.\.\.spec\]\.sort\(\)\)\.toEqual\(Object\.keys\(NOTIFICATION_PRESENTATIONS\)\.sort\(\)\)/, 'chart-type-widget-picker-value-set': /const specTypes: string\[\] = enumOptions\(ChartTypeSchema\)[\s\S]*expect\(\(await addMenuTypes\(\)\)\.sort\(\)\)\.toEqual\(\[\.\.\.specTypes\]\.sort\(\)\)/, 'notification-hook-value-set': /specNames\.filter\(\(name\) => !implemented\.has\(name\)\)[\s\S]*assertParity\(enumOptions\(NotificationTypeSchema\)[\s\S]*assertParity\(enumOptions\(NotificationPositionSchema\)/, + 'script-body-key-set': /HookBodySchema\.options\.map\(\(shape\) => \[shape\.shape\.language\.value, Object\.keys\(shape\.shape\)\.sort\(\)\]\)[\s\S]*expect\(\[\.\.\.BODY_KEYS_BY_LANGUAGE\.keys\(\)\]\.sort\(\)\)\.toEqual\(\[\.\.\.specKeys\.keys\(\)\]\.sort\(\)\)/, + 'end-message-key-set': /Object\.keys\(\(EndConfigSchema as unknown as \{ shape: Record \}\)\.shape\)/, + 'end-output-variable-key-set': /Object\.keys\(\(EndConfigSchema as unknown as \{ shape: Record \}\)\.shape\)/, + 'approval-config-zh-key-set': /\['approval', ApprovalNodeConfigSchema\],\s*\['decision', DecisionConfigSchema\][\s\S]*jsonSchemaToFlowFields\(z\.toJSONSchema\(schema, \{ io: 'input' \}\)\)[\s\S]*expect\(leftEnglish\)\.toEqual\(\[\]\)/, + 'package-source-value-set': /expect\(sorted\(PACKAGE_SOURCES\)\)\.toEqual\(sorted\(InstalledPackageSourceSchema\.options\)\)/, + 'access-scope-value-set': /\.OBJECT_ACCESS_SCOPES\)\.toEqual\(ObjectAccessScopeSchema\.options\)/, + 'color-variant-swatch-value-set': /const specVariants: string\[\] = enumOptions\(WidgetColorVariantSchema\)[\s\S]*\.map\(\(c\) => c\.value\)\)\.toEqual\(specVariants\)/, + 'color-variant-accent-value-set': /const specVariants: string\[\] = enumOptions\(WidgetColorVariantSchema\)[\s\S]*expect\(Object\.keys\(VARIANT_TEXT_CLASSES\)\.sort\(\)\)\.toEqual\(\[\.\.\.specVariants\]\.sort\(\)\)/, + 'filter-operator-key-set': /Object\.keys\(\(FieldOperatorsSchema as unknown as \{ shape\?: Record \}\)\.shape \?\? \{\}\)[\s\S]*'FieldOperatorsSchema accepts these but no builder operator can author them',\s*\)\.toEqual\(\[\]\)/, + 'page-block-type-value-set': /const specNames: string\[\] = enumOptions\(PageComponentType\)[\s\S]*!\(t in \(BLOCK_TYPE_META as Record\)\) && !\(t in PALETTE_EXCLUSIONS\)[\s\S]*expect\(undecided\)\.toEqual\(\[\]\)|listedShapeKeys\(\s*arrayElementSchema\(resolvePropsShape\(RecordDetailsProps\)\?\.sections\)/, + 'page-kind-value-set': /\[\.\.\.\(PageTypeSchema as unknown as \{ options: readonly string\[\] \}\)\.options\]/, + 'aggregation-function-value-set': /expect\(Object\.keys\(CARRIES_FIELD_UNIT\)\.sort\(\)\)\.toEqual\(\[\.\.\.AggregationFunction\.options\]\.sort\(\)\)/, + 'list-gantt-block-key-set': /const declared = Object\.keys\(SpecListViewSchema\.shape\.gantt\.unwrap\(\)\.shape\)[\s\S]*for \(const k of declared\) expect\(node\.gantt\?\.\[k\], k\)\.toBe\(`BLOCK_\$\{k\}`\)/, + 'view-gantt-timeline-key-set': /Object\.keys\(SpecListViewSchema\.shape\.gantt\.unwrap\(\)\.shape\)[\s\S]*Object\.keys\(SpecListViewSchema\.shape\.timeline\.unwrap\(\)\.shape\)/, + 'object-tree-props-key-set': /expect\(specElementKeys\('object-tree'\)\?\.sort\(\)\)\.toEqual\(\[/, + 'chart-axis-config-key-set': /const SPEC_AXIS_KEYS = Object\.keys\(SpecChartAxisSchema\.shape\)\.sort\(\)[\s\S]*expect\(Object\.keys\(FULL_AXIS\)\.sort\(\)\)\.toEqual\(SPEC_AXIS_KEYS\)/, + 'object-chart-axis-config-key-set': /const SPEC_AXIS_KEYS = Object\.keys\(SpecChartAxisSchema\.shape\)\.sort\(\)[\s\S]*expect\(Object\.keys\(FULL_AXIS\)\.sort\(\)\)\.toEqual\(SPEC_AXIS_KEYS\)/, + 'chart-aggregate-legacy-value-set': /\(SpecChartAggregateSchema\.shape\.function as unknown as \{ options: string\[\] \}\)\.options/, + 'list-view-protocol-key-set': /return shapeKeys\(SpecObjectListViewSchema\)\.sort\(\)[\s\S]*expect\(missing, 'objectui is narrower than the protocol on these live keys'\)\.toEqual\(\[\]\)/, + 'record-approvals-row-key-set': /expect\(keysOf\(rowOf\(type\)\)\)\.toEqual\(\[\]\)[\s\S]*expect\(keysOf\(bagOf\(arm\)\)\)\.toEqual\(keysOf\(rowOf\(type\)\)\)/, + 'select-option-key-set': /const specKeys = Object\.keys\(SpecSelectOptionSchema\.shape\)/, + 'user-filter-field-key-set': /expect\(Object\.keys\(MirrorUserFilterField\.shape\)\.sort\(\)\)\.toEqual\(/, + 'tree-config-key-set': /const specKeys = Object\.keys\(TreeConfigSchema\.shape\)\.sort\(\)/, + 'marketplace-taxonomy-value-set': /values: MarketplaceBusinessFunctionSchema\.options \}[\s\S]*values: MarketplaceIndustrySchema\.options \}[\s\S]*values: MarketplaceSolutionTypeSchema\.options \}/, + 'explain-door-parity-value-set': /expect\(\[\.\.\.ExplainOperationSchema\.options\]\.sort\(\)\)\.toEqual\(Object\.keys\(DOORS\)\.sort\(\)\)/, + 'explain-master-write-value-set': /expect\(\[\.\.\.ExplainOperationSchema\.options\]\.sort\(\)\)\.toEqual\(Object\.keys\(DOORS\)\.sort\(\)\)/, }); - t('the live-spelling table covers exactly the thirty-five pins outside the metadata types\' nesting', JSON.stringify(Object.keys(KS_LIVE_SPELLINGS).sort()) === JSON.stringify([...Object.keys(KS_CORE_PKG), ...KS_NEW_UI].sort())); + t('the live-spelling table covers exactly the pins outside the metadata types\' nesting', JSON.stringify(Object.keys(KS_LIVE_SPELLINGS).sort()) === JSON.stringify([...Object.keys(KS_CORE_PKG), ...KS_NEW_UI, ...KS_DOGFOOD].sort())); for (const [k, spelling] of Object.entries(KS_LIVE_SPELLINGS)) { - t(`⭐ LIVE: ${k}'s test still reads its schema from the spec, and every schema the pin holds reads a non-empty set`, spelling.test(ksPinText(k)) && PIN[k].schemas.every((n) => liveSet(n).length > 0)); + t(`⭐ LIVE: ${k}'s test still reads its schema from the spec, and every schema the pin holds reads a non-empty set`, + spelling.test(ksPinText(k)) && PIN[k].schemas.every((n) => (KS_EMPTY_BY_DESIGN.includes(n) ? Array.isArray(liveKs.get(ksRow(n))) : liveSet(n).length > 0))); } + t('…and each empty-by-design row is empty on this tree, an array and not a lost place', + KS_EMPTY_BY_DESIGN.every((n) => JSON.stringify(liveKs.get(ksRow(n))) === '[]')); + // The registry-inputs parity partitions ComponentPropsMap's block list: the row reads it from the literal after the + // `=`, every quoted block type by its content, and the blocks the pin's ledger rows stand for are members of it. + const KS_MAP = liveSet('ComponentPropsMap'); + t(`⭐ LIVE: ComponentPropsMap's row reads the block list (${KS_MAP.length}), quoted keys by their content, the ledgered blocks among them`, + KS_MAP.length > 40 && ['record:approvals', 'element:form', 'element:filter', 'app:launcher', 'element:divider'].every((b) => KS_MAP.includes(b)) + && KS_MAP.every((b) => /^[a-z][\w-]*(?::[\w-]+)?$/.test(b))); + t('⭐ LIVE: one record:details section entry reads through its `within` step, and holds the key the inspector test requires', + liveSet('RecordDetailsProps.sections').includes('name') && !liveSet('RecordDetailsProps').includes('name') && liveSet('RecordDetailsProps').includes('sections')); + t('⭐ LIVE: the retired element:form row reads its tombstoned names (a key retired in place keeps its name)', + JSON.stringify(liveSet('ElementFormPropsSchema')) === JSON.stringify(['aria', 'fields', 'mode', 'object', 'onSubmit', 'submitLabel'])); + t('CONTROL: the section entry and its host render as ONE declaration in a fixture, the entry\'s member inside the host', + (ksSiblings(ksRow('RecordDetailsProps').path).match(/const RecordDetailsProps\b/g) ?? []).length === 1 + && /sections: strictObject\(\{ surface: 'inner' \}/.test(ksSchemaSrc(ksRow('RecordDetailsProps')))); // A spelling that is a bare schema name holds only that the test still MENTIONS the schema: a test that stopped // comparing the set whole would keep it green. Each spelling names an operation on the set (a call or a member read). const ksBareSpellings = (spellings) => Object.entries(spellings).filter(([, re]) => !/\\[(.]/.test(re.source)).map(([k]) => k); @@ -6371,9 +6517,13 @@ export function selfTest({ tier = 'full' } = {}) { return ksFired(SEP_NAV.path, io).join() === 'nav-target-key-set' && ksFired(SEP_NAV.path, quiet).length === 0; })()); const sepPinned = maskComments(ksPinText('nav-target-key-set')); - t(`⭐ LIVE: the separator arm's own keys (${liveSet('SeparatorNavItemSchema').length}) read on this tree, spread nothing, and are exactly what the editor\'s pin retypes a separator to`, - JSON.stringify(liveSet('SeparatorNavItemSchema')) === JSON.stringify(['id', 'order', 'type']) - && /expect\(retyped\)\.toEqual\(\{ id: 'nav_item_3', type: 'separator', order: 3 \}\)/.test(sepPinned)); + // The list is read from the editor test's own `toEqual` literal, so a key added to the arm with the editor and its + // test repaired moves both sides together; only the reader and the test disagreeing reds this case. + const sepRetyped = /expect\(retyped\)\.toEqual\((\{[^}]*\})\)/.exec(sepPinned)?.[1] ?? null; + const sepPinnedKeys = sepRetyped === null ? [] : [...(olm(sepRetyped) ?? [])].sort(); + t(`⭐ LIVE: the separator arm's own keys (${liveSet('SeparatorNavItemSchema').length}) read on this tree, spread nothing, and are exactly what the editor\'s pin retypes a separator to (${sepPinnedKeys.length})`, + sepPinnedKeys.length > 1 && JSON.stringify(liveSet('SeparatorNavItemSchema')) === JSON.stringify(sepPinnedKeys) + && liveSet('SeparatorNavItemSchema').every((k) => !k.startsWith('...'))); // The list view entry of ComponentPropsMap: its own literal, and the list view shape it spreads. const LV_PAGE = ksRow('ListViewPageProps'); const LV_SHAPE = ksRow('ListViewSchema.shape'); @@ -6386,9 +6536,11 @@ export function selfTest({ tier = 'full' } = {}) { const byBase = { [LV_PAGE.path]: page(pageBase), [LV_SHAPE.path]: view(' type: z.string(),') }; return { readHead: (p) => byHead[p] ?? w.readHead(p), readBase: (p) => byBase[p] ?? w.readBase(p) }; }; - t('⭐ a key added to the list view shape derives the registry-inputs pin once ListViewPageProps spreads it, read from the entry\'s own members', - ksFired(LV_SHAPE.path, lvWorld(true)).join() === 'registry-inputs-key-set'); - t('CONTROL: …and nothing while the entry does not spread it', ksFired(LV_SHAPE.path, lvWorld(false)).length === 0); + t('⭐ a key added to the list view shape derives the registry-inputs pin once ListViewPageProps spreads it, read from the entry\'s own members, and the list view protocol pin, which holds the shape itself', + ksFired(LV_SHAPE.path, lvWorld(true)).join() === 'registry-inputs-key-set,list-view-protocol-key-set'); + t('CONTROL: …and only the protocol pin while the entry does not spread it', ksFired(LV_SHAPE.path, lvWorld(false)).join() === 'list-view-protocol-key-set'); + t('⭐ the shape is ONE declaration read by two rows, and a fixture renders it once', (ksSiblings(LV_SHAPE.path).match(/const ListViewShapeSchema\b/g) ?? []).length === 1 + && ksRow('ListViewShapeSchema').declares === LV_SHAPE.declares && ksRow('ListViewShapeSchema').path === LV_SHAPE.path); t('⭐ a key added to ListViewPageProps\' own literal (beside the spread) derives the registry-inputs pin', ksFired(LV_PAGE.path, lvWorld(true, { shapeHead: ' type: z.string(),', pageHead: ' ...ListViewSchema.shape,\n columns: z.array(z.string()),\n options: z.object({}),' })).join() === 'registry-inputs-key-set'); t('⭐ LIVE: the list view entry spreads ListViewSchema\'s shape through the spread row, and ListViewSchema is ListViewShapeSchema with refinements alone chained', @@ -6399,6 +6551,13 @@ export function selfTest({ tier = 'full' } = {}) { t('the arrow row reads the literal the arrow returns, and null once the arrow is re-spaced past the text its call names', JSON.stringify(declaredKeySet('const appTranslationDataShape = () => ({\n objects: x,\n /** apps */\n apps: y,\n});', TR_GROUPS)) === JSON.stringify(['apps', 'objects']) && declaredKeySet('const appTranslationDataShape = () =>\n ({ objects: x });', TR_GROUPS) === null); + t('⭐ …and null, not the NEXT declaration\'s literal, when another arrow returning a literal follows it (the search ends with the declaration)', + declaredKeySet('const appTranslationDataShape = () =>\n ({ objects: x, apps: y });\nconst platformSettingsShape = () => ({\n settings: z,\n});', TR_GROUPS) === null + && declaredKeySet('const appTranslationDataShape = () =>\n ({ objects: x })\nexport const platformSettingsShape = () => ({\n settings: z,\n})', TR_GROUPS) === null); + t('⭐ LIVE: the arrow re-spaced on the live file reads null, never the platform settings arrow below it', + declaredKeySet(readFileSync(nodePath.join(ROOT, TR_GROUPS.path), 'utf8').replace('const appTranslationDataShape = () => ({', 'const appTranslationDataShape = () =>\n ({'), TR_GROUPS) === null); + t('CONTROL: every other row\'s call is still found inside its own declaration on this tree (the bound cuts no live row short)', + SERVED_KEY_SET_DECLARATIONS.every((d) => Array.isArray(liveKs.get(d)))); const TR_SRC = readFileSync(nodePath.join(ROOT, TR_GROUPS.path), 'utf8'); t(`⭐ LIVE: the translation groups read on this tree (${liveSet('appTranslationDataShape').length}), spread nothing, and TranslationDataSchema takes that arrow's return as its shape`, liveSet('appTranslationDataShape').length > 10 && liveSet('appTranslationDataShape').every((k) => !k.startsWith('...'))