Skip to content

fix: complete bounded Python executor parsing (#95) - #111

Merged
wxai-space merged 5 commits into
mainfrom
codex/fix-pr95-clean-depth
Sep 30, 2026
Merged

wxai-space merged 5 commits into
mainfrom
codex/fix-pr95-clean-depth

Conversation

@wxai-space

Copy link
Copy Markdown
Collaborator

Summary

  • Preserve the original contributor commits from fix: narrow bare excepts around json.loads in python_executor #95 and their narrow JSON parsing exception boundaries.
  • Bound dictionary code-field extraction as well as JSON cleanup, including cyclic dictionaries.
  • Add depth-boundary and cycle regression tests without swallowing unrelated cleanup or process-control exceptions.
  • Update the branch to current main, including legacy-executor fail-closed hardening.

Testing

  • Full tracked suite: 358 passed, 1 skipped.
  • git diff --check passed.

Related PR

This branch includes the original #95 commits plus the remaining review fixes. Direct pushes to the contributor fork were unavailable, so the follow-up is hosted in this repository. Please retain contributor attribution when merging.

harshadkhetpal and others added 5 commits September 14, 2026 15:39
- json.loads isolated in _try_json_loads, catching JSONDecodeError,
  TypeError, and RecursionError (deeply nested untrusted JSON) only
  at the parsing boundary
- recursive cleanup bounded by explicit _MAX_CLEAN_DEPTH
- KeyboardInterrupt/SystemExit and cleanup-logic exceptions propagate
- tests: malformed JSON, deep nesting, nested code fields, depth
  limit, process-control propagation

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Harshad Khetpal <harshadkhetpal@users.noreply.github.com>
@wxai-space
wxai-space merged commit f680859 into main Sep 30, 2026
4 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