Skip to content

Fail closed when discovery flags are not YAML booleans - #114

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/discovery-bool-flags-2ccd
Sep 7, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
cursor/discovery-bool-flags-2ccd

Conversation

@jmjava

@jmjava jmjava commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Problem

yaml-generate treats discovery.auto_visual_map: false as the opt-out that keeps a committed visual_map, and discovery.merge_hint_segments: false as the opt-out that skips hint-driven segment / wiring merges.

Those checks used identity is False. YAML integer 0 and the quoted string "false" are not the boolean False, so discovery still ran (and could rewrite visual_map) and hint merges still applied.

Change

  • Require present discovery.auto_visual_map / discovery.merge_hint_segments to be YAML booleans at Config.from_yaml.
  • Re-check the same flags in yaml-generate so a hint merge cannot inject 0 / "false" after load.
  • YAML false / true and missing keys keep current behavior.

Milestone: milestones/discovery-bool-flags.md

Tests

  • Config load rejects auto_visual_map: 0 and "false".
  • discover_visual_map / merge_hint_declared_segments raise instead of silently continuing.
Open in Web Open in Cursor 

cursoragent and others added 2 commits September 7, 2026 21:35
yaml-generate used identity `is False` for auto_visual_map and
merge_hint_segments. Integer 0 and quoted "false" did not opt out, so
discovery could still rewrite visual_map and hint merges still ran.

Co-authored-by: jmjava <jmjava@gmail.com>
Record PR #114 and pytest / benchmark results on the milestone.

Co-authored-by: jmjava <jmjava@gmail.com>
@jmjava
jmjava marked this pull request as ready for review September 7, 2026 21:36
@cursor
cursor Bot merged commit 7beee84 into main Sep 7, 2026
6 checks passed
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.

2 participants