-
Notifications
You must be signed in to change notification settings - Fork 1
Pipeline Plan 242
Seth Ford edited this page Mar 10, 2026
·
5 revisions
The implementation is already complete and all tests pass. Here's the summary:
The fix has been implemented across 7 commits on this branch. The core changes are:
scripts/sw-loop.sh (18 lines changed):
-
Case 2 (line 579): Extended condition from
first_char == "["tofirst_char == "[" || first_char == "{"so JSON objects enter the jq parsing path - Added branching logic within Case 2 to handle arrays (
.[-1].result) vs objects (.result) and arrays (.[].content) vs objects (.content) - Case 3 (line 609): Now only reachable when jq is genuinely unavailable, making the "jq not available" warning accurate
scripts/sw-loop-test.sh (45 lines added):
-
Test 23: 4 assertions covering JSON object extraction:
- Extracts
.resultfrom JSON object - Falls back to
.contentfrom JSON object - Shows placeholder for JSON object with neither field
- Verifies the misleading "jq not available" warning does NOT appear when jq IS available
- Extracts
- All 69 loop tests pass
- The branch has the fix + autonomous cleanup iterations
- Ready for PR creation
- JSON objects (
{...}) are parsed by jq instead of falling through to misleading warning - JSON arrays (
[...]) continue to work as before - The "jq not available" warning only appears when jq is genuinely unavailable
-
.resultextraction works for both formats -
.contentfallback works for both formats - Tests cover all edge cases
- All existing tests still pass