Repository navigation
Fix #829: route detach --purge diagnostics to stderr under --json - #2722
Merged
Merged
Conversation
hyp client detach <client|all> --purge --json dropped every line the purge produced, including cleanup failures. Under --json those lines now go to stderr; stdout stays the unchanged per-client NDJSON. The "Skipped --purge" line, already a stderr line, is no longer silenced by the same json gate. Text mode, dry-run and exit codes are unchanged. Refs #829 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.
Refs #829
What changed
hyp client detach <client|all> --purge --jsonused to drop every line the purge produced, including failures such as "the local CA could not be removed". This follows Phil's recorded decision on the issue (2026-10-06):--json, the purge lines now go to stderr.Tests
The new tests in
test/core/detach-stops-recording.test.jspinprocess.platformto linux, so the purge never reaches the real keychain or launchd. Each one checks that every stdout line parses as JSON and no stderr line does, so a consumer that merges the two streams can't misread a diagnostic as a record.--purge(after normalizing the stage temp root).--purge.all: one record per client, and the purge runs once.--json: stderr says the purge was skipped.Against master's
clients.js:Checks:
npm testhas 8658 passing and 0 failing (3 not run).npm run typecheckis clean.Review notes
contract.jschange, and no MCP codec, tool schema or error-code change.🤖 Generated with Claude Code