config.mjs get reports a review gate that routing does not execute #129
Labels
No labels
already-shipped
bug
documentation
duplicate
enhancement
external-review
good first issue
help wanted
in progress
invalid
needs-decision
proposal
question
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: crenshawdev/cadence-archived#129
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source: strict re-review C-11
Verdict: AGREE - high (reproduced)
Claim as reviewed
Trigger schema defaults can be returned by
config geteven 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 fromroute-table.json's stakes row.cadence-core/templates/config.jsonwrites notriggersblock at all, and:3sets"stakes": "shipped", so every fresh project is in this state. Reproduced against a fresh planning dir:config.mjs getshowsroute.mjs resolveexecutesreview.triggers.plan.gateadjudicatedoffreview.triggers.diff.gateadvisoryoffreview.triggers.phase_diff.gateadvisoryoffreview.triggers.risk_surface.gateblockingblockingThree 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:61is the/cad-configmenu's source of gate defaults and printsadjudicatedfor plan,advisoryfor diff/phase_diff. Percadence-core/workflows/config.md:48-49a knob absent from the repo file is shown "at its effective/default value unlabelled", so the walk shows a user three gates that resolveoff.Note
advisoryis not the executed gate fordifforphase_diffat any of the three stakes levels, so that default is unreachable everywhere, not only atshipped.Mitigating:
cadence-core/workflows/plan.md:60-62andcadence-core/workflows/execute.md:35-39both 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.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.