fix(loop-sync): honor json output flag#138
Merged
cobusgreyling merged 1 commit intoJul 4, 2026
Merged
Conversation
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
Make
loop-sync --jsonemit the machine-readable drift report it documents, so CI and agent loops can parse the result reliably.Changes
templates/pattern-template.md+ updatedregistry.yaml)loop-sync)Details
loop-syncalready parsed--json, butparseArgsdid not return the parsedjsonflag. As a result, users runningloop-sync <target> --jsonstill received the human-readable report.This fixes the CLI contract by carrying the parsed flag through to
main, and adds a CLI-level regression test that parses stdout as JSON even whenloop-syncexits with the existing warning code.Checklist (from CONTRIBUTING)
STATE.md*examples use.examplesuffixdocs/safety.mdnode tools/loop-audit/dist/cli.js .throughscripts/ci-audit-gates.shTesting / Dogfood
cd tools/loop-sync && npm testbash scripts/ci-validate-gates.shbash scripts/ci-audit-gates.shgit diff --checkScreenshots / Examples (if UI or command output)
Before this change,
loop-sync --jsonemitted the human-readableLoop Sync Report. The added regression test now executes the built CLI with--jsonand verifies stdout parses as JSON.This template enforces the high bar this reference is known for.