You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
plan link: required_sensors on E phases is rejected in every documented format, and link state ends inconsistent #91
Found while adopting the PREVC workflow via the MCP server (@dotcontext/mcp 1.1.1).
Repro: a plan scaffolded by context scaffoldPlan, edited to add required_sensors to its prevc: E phase, then plan link.
Tried, on both the original file and a freshly scaffolded slug (so not a caching artifact):
required_sensors: [verify] (the exact format the error message suggests)
required_sensors: ["verify"]
block-list form (required_sensors: / - verify), quoted and unquoted, with and without required_artifacts
Every attempt returns: "Plan … has Execution phase(s) [phase-2] without "required_sensors". Declare them in the plan frontmatter…"
Worse, the failed link half-registers. After the error, plans.json lists the plan as active (and the first one as primary), but the workflow gate plan_required never passes, and the two approvePlan code paths then disagree: called with slug A it answers "workflow is linked to <slug B>"; called with slug B it answers "No plan is linked".
Impact: the P→R and R→E gates cannot be passed legitimately; we had to advance with force: true and record the bypass in session traces, which defeats the gate's purpose.
Suggested fix: make the link validation parse the same frontmatter shape scaffoldPlan emits (nested phase objects with steps), and make registration transactional with validation so a failed link leaves no state.
Thanks for the careful repro — both parts are real bugs. scaffoldPlan wrote generated: 2026-04-12 unquoted, YAML parsed it as a Date, and the canonical frontmatter was discarded, so the linker fell back to body-only phases with no required_sensors, whatever format you used. On top of that, plan link registered tracking and plans.json before validating, so a failed check left the half-linked state that caused the approvePlan errors.
Fix is up in #97: YAML dates are coerced to strings, new plans quote generated, and link validates before writing and rolls back on failure, with tests for the no-partial-state case. It'll ship in the next release.
Activity
vinilana commentedon Nov 22, 2026
Thanks for the careful repro — both parts are real bugs.
scaffoldPlanwrotegenerated: 2026-04-12unquoted, YAML parsed it as a Date, and the canonical frontmatter was discarded, so the linker fell back to body-only phases with norequired_sensors, whatever format you used. On top of that,plan linkregistered tracking andplans.jsonbefore validating, so a failed check left the half-linked state that caused theapprovePlanerrors.Fix is up in #97: YAML dates are coerced to strings, new plans quote
generated, andlinkvalidates before writing and rolls back on failure, with tests for the no-partial-state case. It'll ship in the next release.