fix(cli): exit non-zero on admin info packed storage read failure#747
Closed
ebios-star wants to merge 2 commits intoentrius:testfrom
Closed
fix(cli): exit non-zero on admin info packed storage read failure#747ebios-star wants to merge 2 commits intoentrius:testfrom
ebios-star wants to merge 2 commits intoentrius:testfrom
Conversation
When `_read_contract_packed_storage` returns None, JSON mode already exits 1 via emit_error_json + SystemExit, but human mode printed a yellow warning and exited 0 — the same class of json/human exit-code mismatch fixed in entrius#724 for `issues list --id`. Consolidate both paths so they always raise SystemExit(1); JSON mode still emits the structured error payload, human mode still prints the friendly hint. Add a regression test for the human-mode path alongside the existing JSON-mode regression test.
Collaborator
|
please provide screenshots of before and after this change in the cli |
|
Hi, @ebios-star , @anderdc |
Collaborator
|
Closing — asked on #746 to fold this fix in there. Same class of change, no reason to review twice. |
8 tasks
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.
Summary
When
_read_contract_packed_storagereturnsNoneingitt admin info, JSON mode already exits 1 viaemit_error_json+SystemExit, but human mode printed a yellow warning and exited 0 — the same class of JSON/human exit-code mismatch fixed forissues list --idin #724.Consolidate both paths so they always
raise SystemExit(1); JSON mode still emits the structuredread_failederror payload, human mode still prints the friendly "try --verbose" hint.Related Issues
N/A — follow-on to #724.
Type of Change
Testing
test_admin_info_human_mode_exits_non_zero_on_soft_read_failurenext to the existing JSON-mode regression test.uv run --extra dev pytest tests/— all 430 tests pass.Checklist