Skip to content

Fix source code loading example crash#4

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-correctness-bugs-6e49
Draft

Fix source code loading example crash#4
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-correctness-bugs-6e49

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 14, 2026

Bug and impact

source/load_mod_from_source_code.py crashed immediately when executed because it evaluated a=b without defining b. This broke the example script for any user running it.

Root cause

The dynamic source string assigned b as a variable reference instead of the intended string value.

Fix

Changed the executed source to assign the literal string 'b' and added a unittest regression test that runs the example script end-to-end.

Validation

  • python3 source/load_mod_from_source_code.py
  • python3 -m unittest discover -s tests
Open in Web View Automation 

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