Skip to content

Commit f06ad23

Browse files
committed
fix(spec): the dropped-refinements header counts its body, and the flow translation face classifies objectName
Claude-Session: https://claude.ai/code/session_01JQwxbaiSvS6eyjEknCGKao Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8cf7e51 commit f06ad23

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎packages/spec/dropped-refinements.baseline.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"description": "Shrink-only ledger of every PUBLISHED JSON Schema that is STILL WIDER than the Zod type it was generated from, because a rule written as `.refine()` reaches the runtime and not the file (#18670). `z.toJSONSchema()` has no arm for a `custom` check: a plain record, the same record with a `.refine()`, and the same record with an ABORTING `.refine()` all project byte-identically (measured on zod 4.4.3, the version packages/spec resolves). So a document one of these files ACCEPTS can still be refused at parse time, and an author -- or an AI -- validating against packages/spec/json-schema/** finds out a release later. Each `sites` path is a position under that schema at which a refinement is dropped; the same paths are written onto the artifact itself as `x-dropped-refinements`. Item 2 closed the first patterns: a refinement DECLARED through the closed list in src/shared/refinement-projection.ts is emitted into the published file, reads `projected` rather than `dropped`, and its row LEAVES this ledger in the same PR -- which is why the ledger shrinks and never grows on a repair. Every refinement outside that closed list stays here, and adding an arm to the list is a public-contract decision, not a refactor. Hand-edited on purpose and with no `gen:` script: a generator would let a new gap be admitted by running a command instead of by a decision, which is the silence this ledger exists to end. Adding, removing or moving a site fails packages/spec/scripts/build-schemas.ts until the line moves with it, and the failure prints the corrected entry in full. ⛔ Do not delete or weaken a refinement to shorten this file -- the runtime rule is correct; it is the projection that is silent, and the remedy is to teach the closed list a NAMED pattern, never to drop the rule.",
33
"measured": {
44
"zod": "4.4.3",
5-
"publishedSchemasWithDroppedRefinements": 248,
6-
"droppedRefinementSites": 993,
5+
"publishedSchemasWithDroppedRefinements": 249,
6+
"droppedRefinementSites": 1006,
77
"refinementSitesThatDidProject": 369,
88
"refinementSitesWithNoJsonFormToCompare": 0
99
},

‎packages/spec/src/system/flows-translation-face.test.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ const RUNNER_SLOTS: Readonly<Record<string, Disposition>> = {
106106
'flow.variables[].name': noReader('a variable name — the binding a screen field or node writes to'),
107107
'flow.variables[].type': noReader('a data-type token'),
108108
'flow.variables[].defaultValue': noReader('a value the run binds, not text it shows'),
109+
// [#29442] Read by the start doors, which load the input from that object; the
110+
// object's own labels are translated under `objects.<object>`.
111+
'flow.variables[].objectName': noReader('an object name — the object a start input declared a record id is loaded from'),
109112
'flow.edges[].id': noReader('an edge id'),
110113
'flow.edges[].source': noReader('a node id the edge leaves'),
111114
'flow.edges[].target': noReader('a node id the edge enters'),

0 commit comments

Comments
 (0)