Repository navigation
fix(microskills): skip non-dict JSON lines in load_calls - #199
Open
Tejas Lamba (TejasLamba2006) wants to merge 1 commit into
Open
Tejas Lamba (TejasLamba2006) wants to merge 1 commit into
Tejas Lamba (TejasLamba2006) wants to merge 1 commit into
Conversation
Same pattern as microsoft#180/microsoft#182: json.loads can return null/list/string, and d.get("message") fails with AttributeError on non-dicts. This is a separate fix from microsoft#198 (parse_payload guards) - load_calls parses the transcript, parse_payload parses the proposer reply.
2 tasks done
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
load_callsindistiller.pyparses transcript JSONL files but doesn't guard against non-dict JSON lines. A line likenull,[1,2], or"string"passesjson.loadsbut fails ond.get("message")with AttributeError.This is the same pattern fixed in #180 (cursor readers) and #182 (agent-output readers), applied to the transcript reader used by the proposer.
Changes
Added
isinstance(d, dict)check afterjson.loads, before accessing dict methods.Test plan
Separate from #198 which guards
parse_payload(proposer reply) - this guardsload_calls(transcript parsing).