Skip to content

Fail closed when wizard exclude_patterns is not a list - #94

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/wizard-exclude-lists-2ccd
Sep 7, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
cursor/wizard-exclude-lists-2ccd

Conversation

@jmjava

@jmjava jmjava commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Problem

wizard.exclude_patterns is a list of glob strings. A YAML string was wiped to [] by yaml-generate merge_defaults, and wizard /api/scan iterated it as characters (fnmatch over "a", "r", …). wizard.scan_extensions as a string similarly overwrote the default extension list.

Change

  • Config.from_yaml requires wizard.exclude_patterns / wizard.scan_extensions to be YAML lists of strings when present.
  • merge_defaults raises ValueError instead of replacing a non-list exclude_patterns with [].
  • Missing keys still default.

Milestone: milestones/wizard-exclude-lists.md

Out of scope

  • Empty exclude_patterns: [] remains allowed (archive dirs are still skipped via is_under_archive_dir).
Open in Web Open in Cursor 

cursoragent and others added 2 commits September 7, 2026 19:52
…list

A YAML string for exclude_patterns was wiped to [] by yaml-generate and
iterated as characters by /api/scan. Require string lists at Config load
and in merge_defaults; missing keys still default.

Co-authored-by: jmjava <jmjava@gmail.com>
Local ruff, pytest, and docgen benchmark are green on this branch.

Co-authored-by: jmjava <jmjava@gmail.com>
@jmjava
jmjava marked this pull request as ready for review September 7, 2026 19:53
@cursor
cursor Bot merged commit 1203ba2 into main Sep 7, 2026
6 checks passed
@jmjava
jmjava deleted the cursor/wizard-exclude-lists-2ccd branch October 13, 2026 02:08
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