config.mjs get reports a review gate that routing does not execute #129

Closed
opened 2026-08-15 14:33:33 +00:00 by john · 1 comment
Owner

Source: strict re-review C-11
Verdict: AGREE - high (reproduced)

Claim as reviewed

Trigger schema defaults can be returned by config get even though unresolved routing intentionally uses the stakes table instead, so the displayed effective value can disagree with the gate that actually executes.

At HEAD f354864 (v3.3.0)

cadence-core/bin/config.mjs:261 - values[k] = layered[k] !== undefined ? layered[k] : SCHEMA[k].default; - falls back to the schema default. cadence-core/bin/route.mjs:180-189 (triggerFieldIn) reads only what a config layer actually wrote, by design, so an unset key resolves from route-table.json's stakes row.

cadence-core/templates/config.json writes no triggers block at all, and :3 sets "stakes": "shipped", so every fresh project is in this state. Reproduced against a fresh planning dir:

key config.mjs get shows route.mjs resolve executes
review.triggers.plan.gate adjudicated off
review.triggers.diff.gate advisory off
review.triggers.phase_diff.gate advisory off
review.triggers.risk_surface.gate blocking blocking

Three of four disagree. Schema defaults at cadence-core/config.schema.json:70, :73, :80.

The same drift reaches the interactive surface: cadence-core/references/config-catalog.md:61 is the /cad-config menu's source of gate defaults and prints adjudicated for plan, advisory for diff/phase_diff. Per cadence-core/workflows/config.md:48-49 a knob absent from the repo file is shown "at its effective/default value unlabelled", so the walk shows a user three gates that resolve off.

Note

advisory is not the executed gate for diff or phase_diff at any of the three stakes levels, so that default is unreachable everywhere, not only at shipped.

Mitigating: cadence-core/workflows/plan.md:60-62 and cadence-core/workflows/execute.md:35-39 both warn workflow authors about exactly this. The trap is documented for the code that fires triggers; it is not defended against for a user typing the documented command.

**Source:** strict re-review C-11 **Verdict:** AGREE - high (reproduced) ### Claim as reviewed Trigger schema defaults can be returned by `config get` even though unresolved routing intentionally uses the stakes table instead, so the displayed effective value can disagree with the gate that actually executes. ### At HEAD f354864 (v3.3.0) `cadence-core/bin/config.mjs:261` - `values[k] = layered[k] !== undefined ? layered[k] : SCHEMA[k].default;` - falls back to the schema default. `cadence-core/bin/route.mjs:180-189` (`triggerFieldIn`) reads only what a config layer actually wrote, by design, so an unset key resolves from `route-table.json`'s stakes row. `cadence-core/templates/config.json` writes no `triggers` block at all, and `:3` sets `"stakes": "shipped"`, so every fresh project is in this state. Reproduced against a fresh planning dir: | key | `config.mjs get` shows | `route.mjs resolve` executes | |---|---|---| | `review.triggers.plan.gate` | `adjudicated` | `off` | | `review.triggers.diff.gate` | `advisory` | `off` | | `review.triggers.phase_diff.gate` | `advisory` | `off` | | `review.triggers.risk_surface.gate` | `blocking` | `blocking` | Three of four disagree. Schema defaults at `cadence-core/config.schema.json:70`, `:73`, `:80`. The same drift reaches the interactive surface: `cadence-core/references/config-catalog.md:61` is the `/cad-config` menu's source of gate defaults and prints `adjudicated` for plan, `advisory` for diff/phase_diff. Per `cadence-core/workflows/config.md:48-49` a knob absent from the repo file is shown "at its effective/default value unlabelled", so the walk shows a user three gates that resolve `off`. ### Note `advisory` is not the executed gate for `diff` or `phase_diff` at any of the three stakes levels, so that default is unreachable everywhere, not only at `shipped`. Mitigating: `cadence-core/workflows/plan.md:60-62` and `cadence-core/workflows/execute.md:35-39` both warn workflow authors about exactly this. The trap is documented for the code that fires triggers; it is not defended against for a user typing the documented command.
john added this to the v3.4.1 milestone 2026-08-15 15:01:08 +00:00
Author
Owner

Sequencing: #135 lands first in v3.4.1. Its assertion fails on the current tree, which proves this issue is real before it is touched, and its failure output enumerates the exact trigger rows to fix here. Do not plan this in parallel with #135 - this consumes its output. Full reasoning in the comment on #135.

Sequencing: #135 lands first in v3.4.1. Its assertion fails on the current tree, which proves this issue is real before it is touched, and its failure output enumerates the exact trigger rows to fix here. Do not plan this in parallel with #135 - this consumes its output. Full reasoning in the comment on #135.
john closed this issue 2026-08-15 19:30:22 +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#129
No description provided.