Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # test/service.test.ts
Deploying local-review with
|
| Latest commit: |
7998e9e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://756c503c.local-review-dpz.pages.dev |
| Branch Preview URL: | https://g-json.local-review-dpz.pages.dev |
Merged
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
cli-contract SPEC §1 says
--jsonshould be on the otherservicecommands too. Until now onlyservice statustook it, andinstall,uninstall,start,stopandrestartrefused it with exit 2. Now they take it (minor).hallway service … --json,server/commands/services.ts), so the tools agree:{ ok, action, error?, …what the command found, …every field of service status --json as it is afterwards }.errorisbusyon 75,not installedon 4, and otherwise the reason (exit 1).install:dryRun(and with itdefinition, the file it would write),refreshedandchanged;startandstop:wasRunning;restart:rewritten;uninstall:wasInstalled.withJsoninserver/service/index.tsgives the command a context whoseoutis stderr, and then prints the document. A refusal that's thrown (npx's cache, a checkout, the port in use) still gets its document, with the reason, and is then rethrown, so it's still printed and still exits 1.service logs --jsonstays a usage error (exit 2), and so doeslogs --force. The two scoped-flag tests that assertedstop --jsonandinstall --jsonwere refused now assert those instead.--helpsynopsis and per-command options;--helpblock, regenerated;servicesynopsis;--jsonsection with the fields.Testing
npm test: 509 passed, 0 failed, 3 skipped (main merged in).npm run typecheckis clean.npm run smoke:packis ok. The docs site builds, andcheck-linksreports 3267 internal links OK.New unit tests (
test/service.test.ts), each asserting exactly one document on stdout:--dry-runcarries the definition and writes nothing;not installed(start, stop, restart);busyand the counts;Real use: the packed tarball, in a throwaway prefix and
HOME. A stand-insystemctlreally runs the unit'sExecStart, because there's no systemd here. Every case below printed exactly one JSON document on stdout:start --json, nothing installednot installedinstall --dry-run --jsondryRun: true, the unit on stderrinstall --port 5998 --jsonchanged: true,answering: true,runningVersion0.16.0changed: falsestop --jsonwasRunning: truestop --jsonagainwasRunning: falsestart --jsonrestart --jsonrewritten: falsestop --jsonduring a real in-flightPOST /api/exampleserror: "busy",busy.counts.save: 1start --jsonwith a foregroundserveholding the portuninstall --jsonwasInstalled: trueuninstall --jsonagainwasInstalled: falselogs --jsonThe control,
uninstallwithout--json, still prints its prose on stdout.Checklist
🤖 Generated with Claude Code