Found while reviewing #19017 (@sloemo01, moving Filter's operator list into its @member tag). That PR's new tag is 168 characters, 42% longer than the longest the docs pipeline had previously been handed, so I read publishedMemberDefault to check for truncation. There is none — but the function has a different defect, and it is currently firing.
#19017 is not the cause and is not affected: its prose line contains no =. It is also the reason this was found, and it removed a live instance of the hazard, because the line it deleted contained '=='.
Live latest-open sweep: checked the latest 20 open issues at 2026-09-20T00:12Z; no equivalent found. Memory Core rationale sweep on the symptom's nouns returned the adjacent green-run-certifies-nothing family but nothing on this function. Archive grep over resources/content/issues/ found no prior filing.
Scope correction, after reading docletCompactJsdoc.spec.mjs (see The Architectural Reality). This ticket originally proposed fixing all three of the function's failure modes. Two of them are already documented, deliberately pinned, and backed by .github/CODING_GUIDELINES.md §12, which forbids the authored forms that reach them. Only the third — the one below — is undocumented, undefended and unknown. The scope is now that one.
The Problem
NEO_INLINE_CODE_13 re-derives an Array/Object member's published default from the raw comment text, because JSDoc's optional-parameter syntax [name=default] eats a trailing ]:
let defaultValue = item.comment.substr(item.comment.indexOf('=') + 1);
return defaultValue.substr(0, defaultValue.indexOf('\n'))
indexOf('=') searches the entire comment block, not the @member tag. Any = in the prose above the tag — most commonly a => in an arrow or a key => value description — wins, and the published default becomes a slice of that prose.
Worst specimen: Neo.plugin.Resizable's docblock reads "Directions into which you want to drag => resize". The published default for validDirections is the string "> resize".
Reproducer
npm run generate-docs-json
node -e '
const arr = require("./docs/output/all.json");
for (const d of arr) {
if (!d || d.kind !== "member" || !d.comment) continue;
if (!((d.type && d.type.names) || []).some(n => /array|object/i.test(n))) continue;
const tag = d.comment.search(/@member\b/), eq = d.comment.indexOf("=");
if (tag > -1 && eq > -1 && eq < tag) {
console.log(d.meta.filename + ":" + d.meta.lineno, d.name, "=>", JSON.stringify(d.defaultvalue));
}
}'
The 19 corrupted members, at dev@3f3710df32
file:line
member
published default
plugin/Resizable.mjs:36
validDirections
"> resize"
plugin/Resizable.mjs:80
directions_
"> resize"
component/wrapper/MapboxGL.mjs:37
layers
"> map id, value => {Array} layers"
component/wrapper/MapboxGL.mjs:83
sources
"> map id, value => {Array} sources"
component/wrapper/MapboxGL.mjs:25
dataMap
"> map id"
component/wrapper/MapboxGL.mjs:90
styleMap
"> style name (url)"
component/wrapper/MapboxGL.mjs:102
zoomMap
"> map id"
component/wrapper/AmCharts.mjs:29
dataMap
"> chart id"
worker/Canvas.mjs:22
canvasWindowMap
"> canvasId: {windowId: OffscreenCanvas}"
worker/Canvas.mjs:27
map
"> canvasId: OffscreenCanvas"
component/Base.mjs:278
style
"== vdomRoot` (single node component), the `wrapperStyle` mechanism"
ServiceBase.mjs:122
networkFirstPaths
"= SW v2`) and command a reload."
grid/Body.mjs:183
mountedRows_
" x` would write into a discarded copy and"
form/field/Base.mjs:79
align_
" true."
vdom/VNode.mjs:21
attributes
"'text' nodes"
vdom/VNode.mjs:30
className
"'text' nodes"
vdom/VNode.mjs:52
style
undefined
draggable/DragZone.mjs:67
boundaryContainerId
null
main/addon/DragDrop.mjs:144
windowDragParkRecovery
null
The last four are the same mechanism landing on a falsy result rather than a prose fragment — the member documents with no default instead of a wrong one.
Population, stated in words: every doclet of kind: member whose type names include array or object and whose comment text contains an = at a lower index than @member. That is the whole class; there is no sampling.
The Architectural Reality
The function's own docblock enumerates three edges and closes with "every edge above is silent — nothing throws, and the docs build stays green." Reading only that docblock is what made this ticket's first draft wrong, because two of those edges are already covered:
test/playwright/unit/buildScripts/docletCompactJsdoc.spec.mjs pins both, deliberately, against the real JSDoc parser:
:181 — FORBIDDEN: a one-line array or object default empties the GENERATED default
:233 — THE TRAP: a separate @default on an array or object publishes `/**` as the default, whose own comment says "This arm exists because an earlier version of §12 recommended exactly this form."
Those arms exist so .github/CODING_GUIDELINES.md §12 can forbid the authored forms that reach them. Repairing either one is a guidelines change — it would make a currently-forbidden form safe — and it belongs with §12's author, not inside a slice-anchor fix.
The prose-= edge is different in every way that matters: no authored form triggers it (the author writes a perfectly ordinary docblock), nothing forbids it, no spec covers it, and unlike the other two it produces a value that looks plausible rather than obviously broken.
The Fix
One expression. The = search anchors at the tag instead of at the comment's start:
NEO_CODE_BLOCK_2
\b keeps @memberOf from anchoring, so @memberOf! + @default doclets keep the third edge's behaviour. When no tag is present search returns -1 and indexOf('=', -1) behaves as indexOf('=', 0), so that path is unchanged too — both documented edges survive by construction rather than by luck.
Touched: buildScripts/docs/docletPipeline/memberDefaults.mjs (the expression plus its docblock), and one new spec. No source docblock changes — the 19 comments above are correct JSDoc and the pipeline is what misreads them.
Acceptance Criteria
The = search anchors at the @member tag, word-bounded so @memberOf does not match.
A unit spec calls publishedMemberDefault directly rather than re-implementing it, covering: a prose => above the tag, a prose ==, a prose key => value, a value whose own contents contain = (Filter's '==', '<=', '>='), and the multiline bracket repair the function exists for.
The spec pins both documented edges as unchanged — a one-line block still publishes '', a @memberOf! + @default doclet still publishes /** — so a later widening of scope has to delete an assertion rather than drift past one.
The spec guards its own fixture: JSDoc normalises {String[]} to Array.<String> and the stage matches on 'array', so a fixture carrying the authored spelling falls straight through and every arm goes vacuous. This happened while writing it — six arms returned the parser sentinel — and the arm exists because it did.
Red-first, per arm rather than per suite: 3 failed / 7 passed against the pre-fix source with no skipped arms, 10 passed with the fix, 10 passed again after restoring it. The spec carries no describe.serial, which is why the tally is complete.
One-variable control at the same head, dev@3f3710df32, on the generated all.json:
dev
with the fix
prose-= hijack
19
0
one-line block → ''
1
1
@default → /**
2
2
trailing-comma brackets
4
4
npm run generate-docs-json green; the whole buildScripts unit tier green (788 passed); docletCompactJsdoc.spec.mjs green (10 passed).
Out of Scope
The two documented edges, per The Architectural Reality. Their live instances are TopologyLibrary.mjs:94 / PerspectiveLibrary.mjs:413 (lastErrors=[] in a one-line block) and DefaultConfig.mjsconfig.mainThreadAddons / config.themes (@memberOf! + @default). Those are §12 violations in source, and the interesting question — whether the pipeline should be repaired so §12 can loosen — is worth its own ticket with §12's author.
Four docblocks with a stray trailing comma, which publish a comma inside the default: form/FormContainer.mjs:22, form/Container.mjs:26, form/Fieldset.mjs:24, tab/Container.mjs:69, all baseCls. Pre-existing, unaffected by this change, verified identical on both sides of the control.
plugin/Resizable.mjs:27, whose docblock is tagged @member {String[]} validDirections while the member it documents is static positions on the next line. After this fix it publishes the right array under the wrong name.
Why Neo.collection.Filter#operators is not published as a member doclet at all while 54 other protected-static array members are. Noticed here, unexplained, not load-bearing.
The unit tier's describe.serial habit. 35 files on dev; 0 of 131 e2e and 0 of 2 visual. Captured as a defect-note; measured evidence in the #19015 review.
Avoided Traps
Rewriting the 19 docblocks to remove their = characters. That treats the symptom, costs 19 files, and leaves the next => armed. The prose is good prose; "Directions into which you want to drag => resize" is clearer than any =-free paraphrase.
Fixing all three edges because all three are wrong. Two are load-bearing documentation of forbidden forms. A fix that silently made them work would have left §12 forbidding something safe, and broken three arms that exist to say so.
A balanced-bracket scan instead of the line terminator. I wrote one, and it was strictly better on its own terms — it repaired the one-line form too. It also changed two documented behaviours as a side effect of a fix aimed at a third. Discarded in favour of the one-expression change.
Asserting a count without a member list. My first predicate — "a default that does not parse as a literal" — matched 213 doclets, most of them legitimate class-reference defaults like model => "ColorModel". The real predicate is positional and yields 19. A ratio names one population; the table above names members so the next reader can re-derive rather than trust.
Testing a re-implementation. The module's own docblock says it: "A test that re-implements it cannot fail when this changes, which is the only way a regression here would ever be caught." The spec imports the function.
Related
#19017 — where this was found; safe, and removed one instance of the hazard
#19016 — the stale doc comment that produced #19017
docletCompactJsdoc.spec.mjs + .github/CODING_GUIDELINES.md §12 — the two edges deliberately left alone
Context
Found while reviewing #19017 (@sloemo01, moving
Filter's operator list into its@membertag). That PR's new tag is 168 characters, 42% longer than the longest the docs pipeline had previously been handed, so I readpublishedMemberDefaultto check for truncation. There is none — but the function has a different defect, and it is currently firing.#19017is not the cause and is not affected: its prose line contains no=. It is also the reason this was found, and it removed a live instance of the hazard, because the line it deleted contained'=='.Live latest-open sweep: checked the latest 20 open issues at 2026-09-20T00:12Z; no equivalent found. Memory Core rationale sweep on the symptom's nouns returned the adjacent green-run-certifies-nothing family but nothing on this function. Archive grep over
resources/content/issues/found no prior filing.Scope correction, after reading
docletCompactJsdoc.spec.mjs(see The Architectural Reality). This ticket originally proposed fixing all three of the function's failure modes. Two of them are already documented, deliberately pinned, and backed by.github/CODING_GUIDELINES.md§12, which forbids the authored forms that reach them. Only the third — the one below — is undocumented, undefended and unknown. The scope is now that one.The Problem
NEO_INLINE_CODE_13 re-derives an Array/Object member's published default from the raw comment text, because JSDoc's optional-parameter syntax
[name=default]eats a trailing]:let defaultValue = item.comment.substr(item.comment.indexOf('=') + 1); return defaultValue.substr(0, defaultValue.indexOf('\n'))indexOf('=')searches the entire comment block, not the@membertag. Any=in the prose above the tag — most commonly a=>in an arrow or akey => valuedescription — wins, and the published default becomes a slice of that prose.Worst specimen:
Neo.plugin.Resizable's docblock reads "Directions into which you want to drag => resize". The published default forvalidDirectionsis the string"> resize".Reproducer
npm run generate-docs-json node -e ' const arr = require("./docs/output/all.json"); for (const d of arr) { if (!d || d.kind !== "member" || !d.comment) continue; if (!((d.type && d.type.names) || []).some(n => /array|object/i.test(n))) continue; const tag = d.comment.search(/@member\b/), eq = d.comment.indexOf("="); if (tag > -1 && eq > -1 && eq < tag) { console.log(d.meta.filename + ":" + d.meta.lineno, d.name, "=>", JSON.stringify(d.defaultvalue)); } }'The 19 corrupted members, at
dev@3f3710df32plugin/Resizable.mjs:36validDirections"> resize"plugin/Resizable.mjs:80directions_"> resize"component/wrapper/MapboxGL.mjs:37layers"> map id, value => {Array} layers"component/wrapper/MapboxGL.mjs:83sources"> map id, value => {Array} sources"component/wrapper/MapboxGL.mjs:25dataMap"> map id"component/wrapper/MapboxGL.mjs:90styleMap"> style name (url)"component/wrapper/MapboxGL.mjs:102zoomMap"> map id"component/wrapper/AmCharts.mjs:29dataMap"> chart id"worker/Canvas.mjs:22canvasWindowMap"> canvasId: {windowId: OffscreenCanvas}"worker/Canvas.mjs:27map"> canvasId: OffscreenCanvas"component/Base.mjs:278style"== vdomRoot` (single node component), the `wrapperStyle` mechanism"ServiceBase.mjs:122networkFirstPaths"= SW v2`) and command a reload."grid/Body.mjs:183mountedRows_" x` would write into a discarded copy and"form/field/Base.mjs:79align_" true."vdom/VNode.mjs:21attributes"'text' nodes"vdom/VNode.mjs:30className"'text' nodes"vdom/VNode.mjs:52styleundefineddraggable/DragZone.mjs:67boundaryContainerIdnullmain/addon/DragDrop.mjs:144windowDragParkRecoverynullThe last four are the same mechanism landing on a falsy result rather than a prose fragment — the member documents with no default instead of a wrong one.
Population, stated in words: every doclet of
kind: memberwhose type names includearrayorobjectand whose comment text contains an=at a lower index than@member. That is the whole class; there is no sampling.The Architectural Reality
The function's own docblock enumerates three edges and closes with "every edge above is silent — nothing throws, and the docs build stays green." Reading only that docblock is what made this ticket's first draft wrong, because two of those edges are already covered:
test/playwright/unit/buildScripts/docletCompactJsdoc.spec.mjspins both, deliberately, against the real JSDoc parser::181—FORBIDDEN: a one-line array or object default empties the GENERATED default:233—THE TRAP: a separate @default on an array or object publishes `/**` as the default, whose own comment says "This arm exists because an earlier version of §12 recommended exactly this form."Those arms exist so
.github/CODING_GUIDELINES.md§12 can forbid the authored forms that reach them. Repairing either one is a guidelines change — it would make a currently-forbidden form safe — and it belongs with §12's author, not inside a slice-anchor fix.The prose-
=edge is different in every way that matters: no authored form triggers it (the author writes a perfectly ordinary docblock), nothing forbids it, no spec covers it, and unlike the other two it produces a value that looks plausible rather than obviously broken.The Fix
One expression. The
=search anchors at the tag instead of at the comment's start:NEO_CODE_BLOCK_2
\bkeeps@memberOffrom anchoring, so@memberOf!+@defaultdoclets keep the third edge's behaviour. When no tag is presentsearchreturns-1andindexOf('=', -1)behaves asindexOf('=', 0), so that path is unchanged too — both documented edges survive by construction rather than by luck.Touched:
buildScripts/docs/docletPipeline/memberDefaults.mjs(the expression plus its docblock), and one new spec. No source docblock changes — the 19 comments above are correct JSDoc and the pipeline is what misreads them.Acceptance Criteria
The
=search anchors at the@membertag, word-bounded so@memberOfdoes not match.A unit spec calls
publishedMemberDefaultdirectly rather than re-implementing it, covering: a prose=>above the tag, a prose==, a prosekey => value, a value whose own contents contain=(Filter's'==','<=','>='), and the multiline bracket repair the function exists for.The spec pins both documented edges as unchanged — a one-line block still publishes
'', a@memberOf!+@defaultdoclet still publishes/**— so a later widening of scope has to delete an assertion rather than drift past one.The spec guards its own fixture: JSDoc normalises
{String[]}toArray.<String>and the stage matches on'array', so a fixture carrying the authored spelling falls straight through and every arm goes vacuous. This happened while writing it — six arms returned the parser sentinel — and the arm exists because it did.Red-first, per arm rather than per suite: 3 failed / 7 passed against the pre-fix source with no skipped arms, 10 passed with the fix, 10 passed again after restoring it. The spec carries no
describe.serial, which is why the tally is complete.One-variable control at the same head,
dev@3f3710df32, on the generatedall.json:=hijack''@default→/**npm run generate-docs-jsongreen; the wholebuildScriptsunit tier green (788 passed);docletCompactJsdoc.spec.mjsgreen (10 passed).Out of Scope
TopologyLibrary.mjs:94/PerspectiveLibrary.mjs:413(lastErrors=[]in a one-line block) andDefaultConfig.mjsconfig.mainThreadAddons/config.themes(@memberOf!+@default). Those are §12 violations in source, and the interesting question — whether the pipeline should be repaired so §12 can loosen — is worth its own ticket with §12's author.form/FormContainer.mjs:22,form/Container.mjs:26,form/Fieldset.mjs:24,tab/Container.mjs:69, allbaseCls. Pre-existing, unaffected by this change, verified identical on both sides of the control.plugin/Resizable.mjs:27, whose docblock is tagged@member {String[]} validDirectionswhile the member it documents isstatic positionson the next line. After this fix it publishes the right array under the wrong name.Neo.collection.Filter#operatorsis not published as a member doclet at all while 54 other protected-static array members are. Noticed here, unexplained, not load-bearing.describe.serialhabit. 35 files ondev; 0 of 131 e2e and 0 of 2 visual. Captured as a defect-note; measured evidence in the #19015 review.Avoided Traps
=characters. That treats the symptom, costs 19 files, and leaves the next=>armed. The prose is good prose; "Directions into which you want to drag => resize" is clearer than any=-free paraphrase.model => "ColorModel". The real predicate is positional and yields 19. A ratio names one population; the table above names members so the next reader can re-derive rather than trust.Related
docletCompactJsdoc.spec.mjs+.github/CODING_GUIDELINES.md§12 — the two edges deliberately left aloneOrigin Session ID: 1246b3b3-6cd1-4073-9e20-7bf593f2a22d
Retrieval Hint:
query_raw_memories("published member default sliced from the comment's first equals sign, prose arrow hijacks jsdoc default")