Skip to content

Fail closed when wizard path and git ref are not JSON strings - #133

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

cursor[bot] merged 2 commits into
mainfrom
cursor/wizard-path-ref-2ccd

Conversation

@jmjava

@jmjava jmjava commented Sep 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

POST /api/open-bundle and POST /api/tool/update still used str(data.get(...) or default) after the wizard JSON-object / string-array work.

  • path: ["/tmp/bundle"] became "['/tmp/bundle']" and looked like a missing yaml file.
  • ref: true became "True", which matches the git-ref allowlist and would pip install from that ref.
  • ref: 0 / ref: false are falsy, so they silently fell through to main.

Both fields now go through require_json_string. Missing / null path still means empty (path is required). Missing / null / empty ref still defaults to main.

Test plan

  • New tests: list path → 400; bool / number / list ref → 400; missing ref still installs main
  • ruff check src/ tests/
  • pytest tests/ — 760 passed, 1 skipped
  • docgen benchmark — meets src/docgen/benchmark_data/baseline.json (no --update-baseline)

Milestone: milestones/wizard-path-ref.md

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 7, 2026 23:30
open-bundle path and tool/update ref used str(data.get(...) or default),
so a boolean ref became True (a legal git ref) and a falsy 0/false
silently installed main.

Co-authored-by: jmjava <jmjava@gmail.com>
ruff, pytest (760 passed, 1 skipped), and docgen benchmark all green.

Co-authored-by: jmjava <jmjava@gmail.com>
@jmjava
jmjava marked this pull request as ready for review September 7, 2026 23:41
@cursor
cursor Bot merged commit 08f46ee 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