Repository navigation
Conversation
lore and enso print --json results indented over many lines. last_json tried each line from the bottom first, and a line that is a bare string inside an array (a ticket's source URL, a task ref) is itself valid JSON, so dispatch got a string back instead of the ticket list and crashed: AttributeError: 'str' object has no attribute 'get' (dispatch, line 163) Parse the whole output first, then the tail from the last line that opens an object or array, so log lines before the JSON still work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Problem
lore_bridge.py dispatchcrashes on its first real run:lore work list --json(and enso's--json) print indented, multi-line JSON.last_jsontried each line from the bottom first, and a line holding a bare string inside an array (a ticket's source URL, a task ref) is itself valid JSON, so the bridge got a string instead of the ticket list. Nothing was claimed before the crash. Found while enabling the bridge on athena for Marble (MC-444).Fix
Parse the whole output first; failing that, parse the tail starting at the last line that opens an object or array, so output with log lines before the JSON still works.
Testing
Checked
last_jsonagainst a pretty-printed list, log lines then a pretty list, compact JSON, an enso refusal ({"ok": false, "existing": {...}}) after a warning, and non-JSON. With this version on athena, dispatch claimed MC-444 and created enso task MARBLE-001.🤖 Generated with Claude Code