config.mjs set accepts a repo-scoped key at the global layer without complaint #249

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

config.mjs set applies whatever it is passed, at whatever layer, with no scope validation. A user who writes a repo-scoped key into the user-global layer gets no complaint at write time.

git.auto_close is the sharp case: written globally, it produces no error, and the user only learns the repository never opted in when the close refuses at land time. The refusal is correct; the silence at write time is the defect.

Where

  • cadence-core/bin/config.mjs:151-172 (checkPairs) validates retired / unknown / type, and nothing about layer scope.
  • :216-234 (set) applies whatever passed.
  • No repoScoped* symbol exists anywhere under cadence-core/bin/.

Why it is a general rule and not a special case

32 keys carry the schema "src": "repo" marker. The fix reads that marker rather than hard-coding one key - which is also why it is its own piece of work: it changes write behaviour for 31 keys beyond the one that surfaced it.


Moved to GitHub: https://github.com/crenshawdev/cadence/issues/98

This project's tracker is now GitHub; this repository remains the public archive. Closed here as migrated, not as resolved.

`config.mjs set` applies whatever it is passed, at whatever layer, with no scope validation. A user who writes a repo-scoped key into the user-global layer gets no complaint at write time. `git.auto_close` is the sharp case: written globally, it produces no error, and the user only learns the repository never opted in when the close refuses at land time. The refusal is correct; the silence at write time is the defect. ## Where - `cadence-core/bin/config.mjs:151-172` (`checkPairs`) validates retired / unknown / type, and nothing about layer scope. - `:216-234` (`set`) applies whatever passed. - No `repoScoped*` symbol exists anywhere under `cadence-core/bin/`. ## Why it is a general rule and not a special case 32 keys carry the schema `"src": "repo"` marker. The fix reads that marker rather than hard-coding one key - which is also why it is its own piece of work: it changes write behaviour for 31 keys beyond the one that surfaced it. --- **Moved to GitHub: https://github.com/crenshawdev/cadence/issues/98** This project's tracker is now GitHub; this repository remains the public archive. Closed here as migrated, not as resolved.
john added this to the v3.7.0 milestone 2026-08-23 20:46:36 +00:00
Author
Owner

Scheduled onto v3.7.0 as a rider on #238 rather than on its own.

config.mjs measures 3 reason: sites and 0 hints today, so it is already inside #238's counted set. This issue's whole effect is to add a fourth refusal to that same file. Done during v3.7.0, the new refusal ships with a hint by construction and the self-verify check #238 introduces polices it the moment it lands. Done after, it ships a hint-less refusal into a repo that has just made that a reported problem.

Scheduled onto v3.7.0 as a rider on #238 rather than on its own. `config.mjs` measures 3 `reason:` sites and 0 hints today, so it is already inside #238's counted set. This issue's whole effect is to add a fourth refusal to that same file. Done during v3.7.0, the new refusal ships with a hint by construction and the self-verify check #238 introduces polices it the moment it lands. Done after, it ships a hint-less refusal into a repo that has just made that a reported problem.
john closed this issue 2026-08-25 16:38:00 +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#249
No description provided.