V0.3.1
Release v0.3.1 — Panic & Recover, State Reset
This release introduces panic/recovery semantics to the workflow interpreter, improving debuggability and post-crash continuity. It also adds reset() for reinitializing execution state without recreating the interpreter.
✨ New Features
-
Panic & Recover
Unhandled exceptions now put the interpreter into a panic state, preserving the exception, program pointer, and entire call stack. Execution can be resumed by simply callingrun()orrun_step_by()again on the same interpreter — ideal for post-crash debugging, auditing, or continuation workflows. -
get_exception()
Returns the last panic exception (orNoneif none occurred). Useful for inspecting crashes immediately after a failedrun(). -
reset()
Resets the interpreter’s internal state (pointer, return stack, jump flag, waiter future, panic exception) to initial values. This is independent of recovery — use it when you want to restart a workflow from scratch without creating a new interpreter.
📖 Documentation
- Added comprehensive Panic/Recover section to the API reference, including a comparison table with Try-Catch.
- Documented
get_exception()andreset()in both English and Chinese docs.
🔧 Internal Improvements
- Improved logging on panic: the interpreter logs the exception, pointer location, and interpreter ID before dumping state.
- Enhanced waiter future finalization to avoid hanging on interpreter reset.
🐛 Fixes
- Proper handling of waiter future status during reset to prevent stale waits.
Upgrade:
pip install --upgrade amrita-senseFull Changelog: 0.3.0...0.3.1