Skip to content

Fix source code loader example crash#12

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/critical-correctness-bugs-e85b
Draft

Fix source code loader example crash#12
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/critical-correctness-bugs-e85b

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 22, 2026

Bug and impact

The newly added source/load_mod_from_source_code.py example crashed immediately when run because it executed a=b with no b defined. This made the user-facing example unusable.

Root cause

The source string assigned from an undefined variable instead of assigning the intended literal value.

Fix

Changed the executed source string to a='b' and added a unittest regression that runs the script as a subprocess and verifies stdout/stderr.

Validation

  • PYTHONDONTWRITEBYTECODE=1 python3 source/load_mod_from_source_code.py
  • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover
Open in Web View Automation 

cursoragent and others added 2 commits May 22, 2026 11:03
Co-authored-by: 0-coding <0-coding@users.noreply.github.com>
Co-authored-by: 0-coding <0-coding@users.noreply.github.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.

1 participant