Repository navigation
Accept null diff/explanation in issue fix patches - #181
Closed
Ibrahimrahhal wants to merge 1 commit into
Closed
Ibrahimrahhal wants to merge 1 commit into
Ibrahimrahhal wants to merge 1 commit into
Conversation
GET /issue/{id} can return "diff": null (older backends, fixes with no
patch such as unsupported findings) and never coalesces "explanation".
Both were required strings, so corgea inspect --issue and any caller of
get_issue failed with 'invalid type: null, expected a string'. Read null
as an empty string instead.
Co-authored-by: ibrahim <ibrahim@corgea.com>
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
GET /api/v1/issue/{id}can returnauto_fix_suggestion.patchwith"diff": null. That happens on backends older than doghouse'sfix.diff or ""coalescing, for fixes that have no patch (for example,unsupportedfindings)."explanation": fix.explanationis also sent without coalescing. The CLI deserialized both into requiredStringfields, socorgea inspect --issueand every other caller ofget_issuefailed with:Change
Patch.diffandPatch.explanationnow readnull(or a missing field) as an empty string. Downstream code already treats""as "no patch", so nothing else changes.null.Testing
./harness check: all checks pass (943 tests).