release(0.11.0): handle/guarded/init_or_die + v3 wire contract#48
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
User-facing error handling (Layer 3 of the 'give the user a chance'
design): zero-boilerplate helpers in src/nullrun/_handle.py that
translate any NullRunError into format_user_message(exc) on stderr +
sys.exit(1):
* nullrun.handle() - context manager
* @nullrun.guarded - decorator
* nullrun.init_or_die() - wraps init() so NR-C001 'no api_key'
exits cleanly instead of traceback
All three propagate WorkflowKilledInterrupt (BaseException) unchanged
and let non-NullRun exceptions surface as honest tracebacks. The
handle/guarded/init_or_die symbols are added to _LAZY_EXPORTS and
__all__ in src/nullrun/__init__.py; the module name is _handle.py
(underscore prefix) so it does not collide with the public
nullrun.handle context manager under pytest's test discovery import
path.
v3 wire contract updates (transport.py + runtime.py + exceptions.py +
context.py) and CHANGELOG entries for the 0.10 / 0.11 cycle.
New tests:
* tests/test_handle.py - handle / guarded / init_or_die
including WorkflowKilledInterrupt
bypass and custom exit_code
* tests/test_v3_wire_contract.py - v3 wire ping/heartbeat contract
Bumps:
* pyproject.toml: 0.9.0 -> 0.11.0
* src/nullrun/__version__.py: 0.8.0 -> 0.11.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User-facing error handling (Layer 3 of the 'give the user a chance' design): zero-boilerplate helpers in src/nullrun/_handle.py that translate any NullRunError into format_user_message(exc) on stderr + sys.exit(1):
exits cleanly instead of traceback
All three propagate WorkflowKilledInterrupt (BaseException) unchanged and let non-NullRun exceptions surface as honest tracebacks. The handle/guarded/init_or_die symbols are added to _LAZY_EXPORTS and all in src/nullrun/init.py; the module name is _handle.py (underscore prefix) so it does not collide with the public nullrun.handle context manager under pytest's test discovery import path.
v3 wire contract updates (transport.py + runtime.py + exceptions.py + context.py) and CHANGELOG entries for the 0.10 / 0.11 cycle.
New tests:
including WorkflowKilledInterrupt
bypass and custom exit_code
Bumps:
What
Why
How
Test plan
cd backend && cargo test,cd frontend && npm test)cd frontend && npm run lint)cd frontend && npm run type-check)Risk
Checklist
CONTRIBUTING.md(if present)