PROD-2203: remove --preflight-json flag#176
Open
5PK wants to merge 1 commit into
Open
Conversation
The --preflight-json output was not cleanly machine-readable: the JSON object was emitted amid the sync's normal stdout logging (welcome banner, download progress), so it could not be piped or parsed directly. Rather than rework the output channel, drop the flag entirely and keep the human-readable --preflight table as the only preflight output. - Remove the preflightJson arg, State field, and setState/resetState wiring - Remove PreflightReport.toJSON(); print() now always renders the table - Drop the JSON-output unit tests - Document --preflight in the README Sync options table and examples Co-Authored-By: Claude Opus 4.8 (1M context) <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.
What & why
Follow-up to #168 (now merged). Removes the
--preflight-jsonflag entirely.During a live
--preflightrun against real instances, the--preflight-jsonoutput turned out not to be cleanly machine-readable: the JSON object was emitted in the middle of the sync's normal stdout logging (welcome banner, download progress, phase summaries), so a consumer could not pipe or parse stdout as JSON. Rather than rework the output channel, we drop the flag and keep the human-readable--preflighttable as the only preflight output.The core
--preflight(dry-run preview) feature is unchanged and remains fully working and read-only.Changes
preflightJsonarg (system-args.ts), theStatefield, and itssetState/resetStatewiring (state.ts)PreflightReport.toJSON();print()now always renders the table (preflight-report.ts)--preflightflag in the README (Sync options table + example) — it was previously undocumentedTesting
tsc --noEmitcleanpreflightJson/--preflight-json/toJSONin source or README--preflightstill renders the table and stays read-only;--preflight-jsonis now an unrecognized flag and emits no JSON🤖 Generated with Claude Code