fix(cli): surface contract read failures in gitt issues list#1358
Open
carlos4s wants to merge 1 commit into
Open
fix(cli): surface contract read failures in gitt issues list#1358carlos4s wants to merge 1 commit into
carlos4s wants to merge 1 commit into
Conversation
3d721af to
b7b77d7
Compare
b7b77d7 to
3c2e662
Compare
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
gitt issues listused to treat contract-read failures as an empty issue list. When the RPC/contract read failed, the helper returned[], so the command emittedsuccess: true,issue_count: 0, and exited0.This PR makes contract-read failures explicit:
gitt issues list --jsonnow emitssuccess: falsewitherror.type == "read_failed"and exits1.1.success: true,issue_count: 0,issues: [], and exits0.substrateinterfacenow returnserror.type == "missing_dependency"and keeps theInstall with: uv synchint.The fix also lets deeper contract-info / packed-storage read failures propagate instead of being silently converted to
[]/None.fetch_issue_from_contract, used bygitt issues submissions --id ..., now also surfaces contract-read failures instead of turning them into the misleadingIssue ID <N> not found on-chain.message.Related Issues
Closes #1357
Type of Change
Before / After
JSON mode before
JSON mode after
Human mode after
Testing
Added regression tests for:
success: falseand exits non-zero.No issues found.issue_count: 0.read_failed.uv syncinstall hint.gitt issues submissions --jsonsurfaces contract-read failure assuccess: falseinstead ofissue not found.Commands run:
Checklist