Found while resolving cloud#1653's named unknown (can a host override a framework object's tenancy declaration through the extension seam?).
packages/objectql/src/registry.ts — mergeObjectDefinitions's docblock says:
Fields are merged additively. Other props: later value wins.
The implementation does not do the second half. It merges exactly: fields (additive), validations (additive), indexes (additive), and the three guarded scalars label/pluralLabel/description. Every other top-level prop on an extension is silently dropped — merged = { ...base } and nothing else is copied.
Why it matters: anyone who reads the docblock and ships an objectExtensions entry carrying, say, tenancy: { enabled: false } (the exact thing cloud#1653's investigation considered) gets a silent no-op — the ADR-0078 valid-but-inert shape, on a security-relevant key. The docstring nearly steered a real architecture decision this week.
Two candidate remedies (implementer/triage judges): fix the docblock to state the real (closed) merge set — cheap and honest; or implement the documented semantics — a much bigger decision, since "any extender may override any prop" would make security-relevant keys (tenancy, permissions) extender-writable, which is almost certainly NOT wanted. The docblock fix looks right; the prop-carrying question, if ever wanted, should be per-key and deliberate.
Found while resolving cloud#1653's named unknown (can a host override a framework object's
tenancydeclaration through the extension seam?).packages/objectql/src/registry.ts—mergeObjectDefinitions's docblock says:The implementation does not do the second half. It merges exactly:
fields(additive),validations(additive),indexes(additive), and the three guarded scalarslabel/pluralLabel/description. Every other top-level prop on an extension is silently dropped —merged = { ...base }and nothing else is copied.Why it matters: anyone who reads the docblock and ships an
objectExtensionsentry carrying, say,tenancy: { enabled: false }(the exact thing cloud#1653's investigation considered) gets a silent no-op — the ADR-0078 valid-but-inert shape, on a security-relevant key. The docstring nearly steered a real architecture decision this week.Two candidate remedies (implementer/triage judges): fix the docblock to state the real (closed) merge set — cheap and honest; or implement the documented semantics — a much bigger decision, since "any extender may override any prop" would make security-relevant keys (
tenancy,permissions) extender-writable, which is almost certainly NOT wanted. The docblock fix looks right; the prop-carrying question, if ever wanted, should be per-key and deliberate.