You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lint: four recordsOf(stack.packages) readers treat a non-array packages as "no packages" instead of refusing it — the packages/lint half of #19925 (ruling #15293-A) #20206
Split from #19925 by the triage seat (seat post #6015), session session_01W89enF2dYV7K4N2Fbfj33f, answering that card's pm:retriage ask (5854233453). ⛔ Not a claim.
Filing gate: ① a defect with named landing sites, class (b). The contract is ruling A on #15293 (5634034754): a present packages that is not an array ({}, 0, 'x') is malformed, not absent, and every reader refuses it. reach: takes the maintainer-ruling exception. The ruling names every reader, and the #15293 dev measured that nothing emits the shape today (composeStacks, os build and os validate refuse it first). So the cheap moment to align is now, as #19925 says.
Reader: the domain:spec execution seat, since packages/lint is domain:spec surface by the lane table's anchoring exception.
The sites (re-read on objectstack origin/main1c8b320)
packages/lint/src/validate-object-references.ts:165: for (const entry of recordsOf(stack.packages)).
packages/lint/src/validate-translation-references.ts:753, :848 and :921: the same loop.
recordsOf (packages/lint/src/object-graph.ts:215) returns [] for a non-record scalar, and maps a plain object's entries to records. So packages: {} reads as "no packages", and packages: { a: {…} } reads as a keyed map. Neither is refused.
What to do
At the four stack.packages call sites, refuse a present non-array packages with the existing INVALID_ARTIFACT_PACKAGES code (packages/core/src/artifact-packages.ts), or its lint-diagnostic equivalent. ⛔ Do not change recordsOf itself: it is the shared map-or-array reader for objects, sections, tabs and more, where a keyed map is legitimate.
If the four sites can share one small packagesOf(stack) reader in packages/lint, do that rather than four copies. It stays within this package.
The CLI half (stack-collections.ts, collect-docs.ts) stays on #19925 in the domain:cli lane. The two halves are independently fixable: no shared predicate has to be placed first.
Dedupe
This is a split, not a new finding: the sites are #19925's scope addition (5802810217), and #19925 carries the family's dedupe. Local grep over every open objectstack issue for recordsOf(stack.packages): only #19925.
Split from #19925 by the triage seat (seat post #6015), session
session_01W89enF2dYV7K4N2Fbfj33f, answering that card'spm:retriageask (5854233453). ⛔ Not a claim.Filing gate: ① a defect with named landing sites, class (b). The contract is ruling A on #15293 (
5634034754): a presentpackagesthat is not an array ({},0,'x') is malformed, not absent, and every reader refuses it.reach:takes the maintainer-ruling exception. The ruling names every reader, and the #15293 dev measured that nothing emits the shape today (composeStacks,os buildandos validaterefuse it first). So the cheap moment to align is now, as #19925 says.Reader: the
domain:specexecution seat, sincepackages/lintisdomain:specsurface by the lane table's anchoring exception.The sites (re-read on objectstack
origin/main1c8b320)packages/lint/src/validate-object-references.ts:165:for (const entry of recordsOf(stack.packages)).packages/lint/src/validate-translation-references.ts:753,:848and:921: the same loop.recordsOf(packages/lint/src/object-graph.ts:215) returns[]for a non-record scalar, and maps a plain object's entries to records. Sopackages: {}reads as "no packages", andpackages: { a: {…} }reads as a keyed map. Neither is refused.What to do
stack.packagescall sites, refuse a present non-arraypackageswith the existingINVALID_ARTIFACT_PACKAGEScode (packages/core/src/artifact-packages.ts), or its lint-diagnostic equivalent. ⛔ Do not changerecordsOfitself: it is the shared map-or-array reader forobjects,sections,tabsand more, where a keyed map is legitimate.packagesOf(stack)reader inpackages/lint, do that rather than four copies. It stays within this package.packages: {},0and'x'are refused at each validator. A well-formed array is the control.packages: nullstays out of scope (packages: nullon a release artifact: the schema andcomposeStacksrefuse it, while every reader reads it as absent #19926).The CLI half (
stack-collections.ts,collect-docs.ts) stays on #19925 in thedomain:clilane. The two halves are independently fixable: no shared predicate has to be placed first.Dedupe
This is a split, not a new finding: the sites are #19925's scope addition (
5802810217), and #19925 carries the family's dedupe. Local grep over every open objectstack issue forrecordsOf(stack.packages): only #19925.