config.mjs get __proto__ returns a silent success instead of unknown-key #220

Closed
opened 2026-08-18 20:49:39 +00:00 by john · 1 comment
Owner

Verified live 2026-08-18: node cadence-core/bin/config.mjs get __proto__ returns {"ok":true,"values":{},"source":"global+repo"} while config.mjs get nosuchkey correctly returns unknown-key.

The cause is the prototype-getter hazard on the one config.mjs face CFG-01 did not narrow: wanted.filter((k) => !SCHEMA[k]) reads SCHEMA["__proto__"] as Object.prototype, which is truthy, so the key is never reported unknown. Same class as the deepMerge hazard, one face further out.

A silent success naming no key is the shape this seam exists to prevent: the caller cannot tell a typo from a key that resolved to nothing.

cadence-core/bin/config.mjs, the get face.

Verified live 2026-08-18: `node cadence-core/bin/config.mjs get __proto__` returns `{"ok":true,"values":{},"source":"global+repo"}` while `config.mjs get nosuchkey` correctly returns unknown-key. The cause is the prototype-getter hazard on the one `config.mjs` face CFG-01 did not narrow: `wanted.filter((k) => !SCHEMA[k])` reads `SCHEMA["__proto__"]` as `Object.prototype`, which is truthy, so the key is never reported unknown. Same class as the `deepMerge` hazard, one face further out. A silent success naming no key is the shape this seam exists to prevent: the caller cannot tell a typo from a key that resolved to nothing. `cadence-core/bin/config.mjs`, the `get` face.
john added this to the v3.5.5 milestone 2026-08-18 20:49:39 +00:00
Author
Owner

Closed by v3.5.5 (ARG-05, verified against the shipped tree).

Closed by v3.5.5 (ARG-05, verified against the shipped tree).
john closed this issue 2026-08-19 20:59:55 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: crenshawdev/cadence-archived#220
No description provided.