Context
Surfaced during review of #21014 (implementing #21010 under Epic #20498 / responsibility map #20527) per .agents/skills/pr-review/references/pr-review-guide.md §2.5 ("Verified inherited debt beyond a safe repair gets a real issue in this review, whatever the verdict"). When authoring the new Config Descriptors reference section against src/core/Config.mjs, #21014 transcribed two stale @param defaults from Neo.core.Config#initDescriptor (lines 90–97) that contradict Config.prototype and runtime behavior.
Ownership: unowned-rationale: Ready for a contributor; maintainers provide planning and review.
The Problem
In src/core/Config.mjs, the @member JSDoc blocks (lines 40–63) and Object.defineProperties(Config.prototype, ...) (lines 237–242) were updated when prototype-level defaults (cloneOnGet: null, mergeStrategy: 'replace') replaced earlier descriptor defaults (#6934), but initDescriptor's method JSDoc (lines 89–98) was never updated to match:
descriptor.cloneOnGet (line 94): Currently reads:
@param {string} [descriptor.cloneOnGet] - The clone strategy for get. Defaults to 'shallow' if clone is 'deep' or 'shallow', and 'none' if clone is 'none'.
At runtime, Config.prototype.cloneOnGet is null (lines 49, 239) and initDescriptor (lines 108–112) never derives cloneOnGet from clone. In the generated getter (src/Neo.mjs:387–409), Date values are always cloned (new Date(value.valueOf())); when cloneOnGet is explicitly set ('deep', 'shallow', or 'none'), that strategy governs ('none' skips the fallback array copy); when cloneOnGet remains null, Array values are shallow-sliced (value.slice()) regardless of clone while plain objects are returned without copying.
descriptor.merge (line 96): Currently reads:
@param {string} [descriptor.merge='deep'] - The merge strategy.
At runtime, Config.prototype.mergeStrategy defaults to 'replace' (lines 60, 62, 241), NOT 'deep', and descriptor.merge accepts {Function|String} ('replace', 'shallow', 'deep', 'deepArrays', or a custom (defaultValue, instanceValue) => merged function in Neo.mergeConfig, src/Neo.mjs:713–738).
- Summary key list (
line 90) & class header wording (line 10):
line 90 says Extracts clone, mergeStrategy and isEqual from the descriptor, omitting cloneOnGet and naming the target field mergeStrategy instead of the input descriptor key merge (initDescriptor({clone, cloneOnGet, isEqual, merge})).
line 10 refers to "the Neo.mjs framework" instead of "the Neo.mjs runtime engine" (category-drift terminology).
The Architectural Reality
Design authority: src/core/Config.mjs @member JSDoc (lines 46–63) and Config.prototype (lines 237–242): "The cloning strategy to use when getting a value. Supported values: 'deep', 'shallow', 'none'. @member {String} cloneOnGet=null" and "Defaults to 'replace'. Can be overridden via a descriptor merge property. Supported values: 'deep', 'deepArrays', 'replace', 'shallow'. @member {Function|String} mergeStrategy='replace'".
src/core/Config.mjs:99–125: initDescriptor({clone, cloneOnGet, isEqual, merge}) defines own properties on me only when truthy and differing from Config.prototype (clone, cloneOnGet, isEqual, and merge → me.mergeStrategy).
src/Neo.mjs:387–409: generated reactive getter checks value instanceof Date, then else if (config.cloneOnGet) ('deep' / 'shallow', with 'none' truthy so it bypasses the legacy branch), then else if (Array.isArray(value)) { value = value.slice() }.
src/Neo.mjs:713–738, 1029–1033 & src/core/Base.mjs:767–773: Neo.mergeConfig(defaultValue, instanceValue, strategy) supports 'shallow', 'deep', 'deepArrays', custom Function, and falls back to 'replace' (return instanceValue).
Decision Record impact: none.
The Fix
Update JSDoc comments only in src/core/Config.mjs (zero runtime behavior change):
line 10: Replace within the Neo.mjs framework. with within the Neo.mjs runtime engine.
line 90: Update the summary sentence to accurately name the extracted descriptor keys (clone, cloneOnGet, isEqual, and merge, storing merge on mergeStrategy).
lines 93–97: Align @param types ({String} / {Function|String} matching the @member tags above) and defaults:
[descriptor.clone='deep'] — supported values 'deep', 'shallow', 'none'.
[descriptor.cloneOnGet=null] — supported values 'deep', 'shallow', 'none'; when null (unset), Date values are cloned and Array values are shallow-sliced on read while plain objects return as-is (src/Neo.mjs getter).
[descriptor.isEqual=Neo.isEqual] — equality comparison function.
[descriptor.merge='replace'] — {Function|String} merge strategy ('replace', 'shallow', 'deep', 'deepArrays', or a (defaultValue, instanceValue) function).
Acceptance Criteria
Out of Scope
- Changing runtime
cloneOnGet, clone, or mergeStrategy behavior in src/core/Config.mjs, src/Neo.mjs, or src/core/Base.mjs.
- Guide edits in
learn/guides/fundamentals/ConfigSystemDeepDive.md (owned by #21010 / PR #21014).
Avoided Traps
- Changing
Config.prototype defaults to match the stale JSDoc: cloneOnGet: null and mergeStrategy: 'replace' are load-bearing across the engine (changing default mergeStrategy to 'deep' or cloning every plain object on get would break reference identity and regress hot getters). Only the stale JSDoc in src/core/Config.mjs changes.
Related
Sweeps
Live latest-open + closed sweep: checked latest 20 open (#20903–#21016, backlog band: 52 open — red; no existing open ticket owns src/core/Config.mjs JSDoc) + closed searches ("Config initDescriptor JSDoc", "Config.mjs cloneOnGet", "initDescriptor"; read #1156 and #6934 bodies/Out of Scope) at 2026-11-15T09:44Z; no equivalent or prior exclusion found
A2A in-flight claim sweep: checked newest 30 messages (status: 'all') at 2026-11-15T09:44Z; zero claims on src/core/Config.mjs
MC sweep: "src/core/Config.mjs initDescriptor stale JSDoc cloneOnGet merge default replace", 5 results (4e171c29, 99e77576, 0bcc057b, 1218a36f, 7a3d82ab) + ask_knowledge_base(type='ticket'), no prior ticket or exclusion found
Own-assignment sweep: 3 open (#20999, #20987, #20671), none overlapping
Structure-map gate: N/A (JSDoc-only in src/core/Config.mjs)
Origin Session ID: 2f084437-cc03-4b7b-aace-a27bff4aa3f9
Retrieval Hint: "Neo.core.Config initDescriptor stale JSDoc cloneOnGet null merge replace Config.prototype"
Context
Surfaced during review of
#21014(implementing#21010under Epic#20498/ responsibility map#20527) per.agents/skills/pr-review/references/pr-review-guide.md§2.5 ("Verified inherited debt beyond a safe repair gets a real issue in this review, whatever the verdict"). When authoring the new Config Descriptors reference section againstsrc/core/Config.mjs,#21014transcribed two stale@paramdefaults fromNeo.core.Config#initDescriptor(lines 90–97) that contradictConfig.prototypeand runtime behavior.Ownership:
unowned-rationale: Ready for a contributor; maintainers provide planning and review.The Problem
In
src/core/Config.mjs, the@memberJSDoc blocks (lines 40–63) andObject.defineProperties(Config.prototype, ...)(lines 237–242) were updated when prototype-level defaults (cloneOnGet: null,mergeStrategy: 'replace') replaced earlier descriptor defaults (#6934), butinitDescriptor's method JSDoc (lines 89–98) was never updated to match:descriptor.cloneOnGet(line 94): Currently reads:@param {string} [descriptor.cloneOnGet] - The clone strategy for get. Defaults to 'shallow' if clone is 'deep' or 'shallow', and 'none' if clone is 'none'.At runtime,Config.prototype.cloneOnGetisnull(lines 49, 239) andinitDescriptor(lines 108–112) never derivescloneOnGetfromclone. In the generated getter (src/Neo.mjs:387–409),Datevalues are always cloned (new Date(value.valueOf())); whencloneOnGetis explicitly set ('deep','shallow', or'none'), that strategy governs ('none'skips the fallback array copy); whencloneOnGetremainsnull,Arrayvalues are shallow-sliced (value.slice()) regardless ofclonewhile plain objects are returned without copying.descriptor.merge(line 96): Currently reads:@param {string} [descriptor.merge='deep'] - The merge strategy.At runtime,Config.prototype.mergeStrategydefaults to'replace'(lines 60, 62, 241), NOT'deep', anddescriptor.mergeaccepts{Function|String}('replace','shallow','deep','deepArrays', or a custom(defaultValue, instanceValue) => mergedfunction inNeo.mergeConfig,src/Neo.mjs:713–738).line 90) & class header wording (line 10):line 90saysExtracts clone, mergeStrategy and isEqual from the descriptor, omittingcloneOnGetand naming the target fieldmergeStrategyinstead of the input descriptor keymerge(initDescriptor({clone, cloneOnGet, isEqual, merge})).line 10refers to"the Neo.mjs framework"instead of"the Neo.mjs runtime engine"(category-drift terminology).The Architectural Reality
Design authority:src/core/Config.mjs@memberJSDoc (lines 46–63) andConfig.prototype(lines 237–242): "The cloning strategy to use when getting a value. Supported values: 'deep', 'shallow', 'none'.@member {String} cloneOnGet=null" and "Defaults to 'replace'. Can be overridden via a descriptor merge property. Supported values: 'deep', 'deepArrays', 'replace', 'shallow'.@member {Function|String} mergeStrategy='replace'".src/core/Config.mjs:99–125:initDescriptor({clone, cloneOnGet, isEqual, merge})defines own properties onmeonly when truthy and differing fromConfig.prototype(clone,cloneOnGet,isEqual, andmerge→me.mergeStrategy).src/Neo.mjs:387–409: generated reactive getter checksvalue instanceof Date, thenelse if (config.cloneOnGet)('deep'/'shallow', with'none'truthy so it bypasses the legacy branch), thenelse if (Array.isArray(value)) { value = value.slice() }.src/Neo.mjs:713–738, 1029–1033&src/core/Base.mjs:767–773:Neo.mergeConfig(defaultValue, instanceValue, strategy)supports'shallow','deep','deepArrays', customFunction, and falls back to'replace'(return instanceValue).Decision Record impact:
none.The Fix
Update JSDoc comments only in
src/core/Config.mjs(zero runtime behavior change):line 10: Replacewithin the Neo.mjs framework.withwithin the Neo.mjs runtime engine.line 90: Update the summary sentence to accurately name the extracted descriptor keys (clone,cloneOnGet,isEqual, andmerge, storingmergeonmergeStrategy).lines 93–97: Align@paramtypes ({String}/{Function|String}matching the@membertags above) and defaults:[descriptor.clone='deep']— supported values'deep','shallow','none'.[descriptor.cloneOnGet=null]— supported values'deep','shallow','none'; whennull(unset),Datevalues are cloned andArrayvalues are shallow-sliced on read while plain objects return as-is (src/Neo.mjsgetter).[descriptor.isEqual=Neo.isEqual]— equality comparison function.[descriptor.merge='replace']—{Function|String}merge strategy ('replace','shallow','deep','deepArrays', or a(defaultValue, instanceValue)function).Acceptance Criteria
src/core/Config.mjsinitDescriptorJSDoc (lines 89–98) lists the exact descriptor keys (clone,cloneOnGet,isEqual,merge,value) and accurate defaults (clone='deep',cloneOnGet=null,isEqual=Neo.isEqual,merge='replace') with{Function|String}ondescriptor.merge, matchingConfig.prototype(lines 237–242) andsrc/Neo.mjs.src/core/Config.mjsclass JSDoc (line 10) replacesNeo.mjs frameworkwithNeo.mjs runtime engine.src/core/Config.mjschange, and existing Config unit tests (npx playwright test test/playwright/unit/config/ --config=test/playwright/playwright.config.unit.mjs) pass.Out of Scope
cloneOnGet,clone, ormergeStrategybehavior insrc/core/Config.mjs,src/Neo.mjs, orsrc/core/Base.mjs.learn/guides/fundamentals/ConfigSystemDeepDive.md(owned by#21010/ PR#21014).Avoided Traps
Config.prototypedefaults to match the stale JSDoc:cloneOnGet: nullandmergeStrategy: 'replace'are load-bearing across the engine (changing defaultmergeStrategyto'deep'or cloning every plain object on get would break reference identity and regress hot getters). Only the stale JSDoc insrc/core/Config.mjschanges.Related
Sweeps
Live latest-open + closed sweep: checked latest 20 open (#20903–#21016, backlog band: 52 open — red; no existing open ticket owns src/core/Config.mjs JSDoc) + closed searches ("Config initDescriptor JSDoc", "Config.mjs cloneOnGet", "initDescriptor"; read #1156 and #6934 bodies/Out of Scope) at 2026-11-15T09:44Z; no equivalent or prior exclusion foundA2A in-flight claim sweep: checked newest 30 messages (status: 'all') at 2026-11-15T09:44Z; zero claims on src/core/Config.mjsMC sweep: "src/core/Config.mjs initDescriptor stale JSDoc cloneOnGet merge default replace", 5 results (4e171c29, 99e77576, 0bcc057b, 1218a36f, 7a3d82ab) + ask_knowledge_base(type='ticket'), no prior ticket or exclusion foundOwn-assignment sweep: 3 open (#20999, #20987, #20671), none overlappingStructure-map gate: N/A (JSDoc-only in src/core/Config.mjs)Origin Session ID:
2f084437-cc03-4b7b-aace-a27bff4aa3f9Retrieval Hint:"Neo.core.Config initDescriptor stale JSDoc cloneOnGet null merge replace Config.prototype"