Skip to content

Fail closed when hint segment create is not a YAML boolean - #116

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/hint-segment-create-bool-2ccd
Sep 7, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
cursor/hint-segment-create-bool-2ccd

Conversation

@jmjava

@jmjava jmjava commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Problem

yaml-generate inserts segments.all ids from hints/*.md when docgen.segment.create is truthy. Quoted create: "false" is a non-empty string, so it still declared the segment. A list stem was str()'d into segment_names; a list id failed the \d{2} check and was skipped as if the hint were prose-only.

YAML create: false already skipped. Integer id: 5 still pads to "05".

Change

parse_hint_segment_declaration requires:

  • present create to be a YAML boolean
  • stem to be a YAML string
  • id to be a YAML string or integer (not bool/list)

Milestone: milestones/hint-segment-create-bool.md

Tests

  • create: "false" raises
  • list stem / id raise
  • existing create: false skip and integer id: 5 pad tests remain
Open in Web Open in Cursor 

cursoragent and others added 2 commits September 7, 2026 21:44
Quoted create: "false" was truthy, so yaml-generate still inserted the
segment. List stem was str()'d into segment_names; list id was skipped.

Co-authored-by: jmjava <jmjava@gmail.com>
Record PR #116 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:44
@cursor
cursor Bot merged commit a1a073f 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