Skip to content

fix(plans): accept scaffold required_sensors and link atomically - #97

Open
vinilana wants to merge 1 commit into
mainfrom
cursor/fix-plan-link-required-sensors-89cb
Open

vinilana wants to merge 1 commit into
mainfrom
cursor/fix-plan-link-required-sensors-89cb

Conversation

@vinilana

Copy link
Copy Markdown
Owner

Summary

plan link rejected required_sensors on Execution phases even when the plan markdown declared them in every documented YAML shape. The root cause was scaffold output writing generated: YYYY-MM-DD without quotes; js-yaml parses that as a Date, parseScaffoldFrontMatter dropped the whole canonical block, and the linker fell back to body-only phases with no requirements.

Link validation also ran after linkPlan had already written tracking/index state, so a failed validation left plans.json showing an active plan while gates still failed.

Changes

  • Coerce unquoted YAML generated values back to YYYY-MM-DD in parseScaffoldFrontMatter, and quote generated in new scaffold output.
  • Parse and validate Execution-phase required_sensors before persisting link state; roll back brand-new tracking if workflow binding fails.
  • Add regression tests for scaffold frontmatter shapes and for “validation failure leaves no tracking/index”.

Validation

  • npm run build
  • npm test -- --runInBand

Fixes #91

Open in Web Open in Cursor 

… atomically

Coerce unquoted YAML generated dates so canonical plan frontmatter parses
required_sensors on Execution phases. Validate plans before persisting link
state and revoke new tracking when workflow binding fails.

Co-authored-by: Vinicius Lana <viniciuslanadev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plan link: required_sensors on E phases is rejected in every documented format, and link state ends inconsistent

2 participants