Repository navigation
feat(cli): service install --dry-run/--from-checkout, port refusal, --json on service actions, serve --quiet (CLI contract SPEC §1, §3) - #996
Merged
Conversation
The contract's eight checks with the shared ids, then Paddock's own (config, projects, claude-login, claude-cli). ✓/!/✗/- lines with a fix: under every warning and failure, exit 1 on a failure, --json matching schemas/doctor.schema.json, the update notice on stderr. --offline is scoped to doctor. The update check writes update-check.json only into a data dir that already exists, so doctor never creates an instance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… --json on the service actions, serve --quiet; re-sync service/ and runtime-file with the reference (WIP) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d doctor steps Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…herwise (SPEC §1) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying paddock with
|
| Latest commit: |
b203003
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ac16d9f4.paddock-7u2.pages.dev |
| Branch Preview URL: | https://g-shoulds-2.paddock-7u2.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.
The CLI contract's remaining
service/serveshoulds (SPEC §1, §3), plus two musts found on the wayWhat landed
service install --dry-run: the systemd unit / launchd plist on stdout, where it would go on stderr, nothing written (no unit, no folder, nosystemctl/launchctlcall). Works with--refreshand--json({ ok, action, dryRun, unit, contents }).--from-checkout: a package root not under anynode_modules(SPEC §6's checkout /npm linkrow)./api/busy'scounts; the unit's own running service on that port is also accepted, so a pre-0.81 service can still be reinstalled over.isListening/identifyPaddockmoved toservice/ready.ts;doctor's port check uses the same code.--refreshdid, soservice installover a--port 9000service moved it to 7233.--jsononinstall/uninstall/start/stop/restart: one document on stdout,{ ok, action, error?, ...status afterwards }(Hallway's shape; the fields afteractionarestatus --json's), all prose on stderr, exit codes unchanged (error: "busy"on 75,"not installed"on 4; a thrown failure prints its document and thenpaddock: …as before).serve --quiet/-q: onlyPaddock <version>: <url>(and no first-run note).--dry-run,--from-checkout(service install),--quiet(serve), and--jsonnow exit 2 onserve,service logs,config eject(they were accepted and ignored).logs --jsonhas no sensible document, so it's rejected.cli/service/systemd.tsandlaunchd.tsto cli-contractd5ddc0e(a refused first install removes its unit; headers stay @ 0.2).src/runtime-file.tsis now the reference @ 0.2 verbatim with the standard header (local changes: none) — it only differed in quote style.--helpupdated. Changeset: minor (names every exit-code change).scripts/service-real.mjsgains:install --dry-run(unit on stdout, nothing written),install --json(the document),doctor --offline --jsonagainst the real service, and a flagless reinstall that keeps the port and replaces the pid.serviceInstallruns from a global install).Testing
test/unit/cli-service-shoulds.test.ts(49): every scoped flag accepted/refused, dry-run on both platforms incl.--refresh(mtime unchanged) and--json, checkout refusal (+--dry-run,--from-checkout, control), port refusal and its two exceptions, reinstall keeps settings (+ control),--jsonon each action incl. 4/75/thrown failures, first-install cleanup on systemd and launchd (+ reinstall control).Real-use QA (packed tarball, throwaway HOME/prefix/cache, batch, no credentials, the repo's stand-in
systemctl)install --dry-run→ unit on stdout, note on stderr, home tree byte-identical before/after;--dry-run --jsonparses.--jsonstill one document,--from-checkout --dry-runprints a unit naming the checkout; nothing written.python3 -m http.serveron the port → install refused (1), nothing written; reinstall over a running Paddock on the same port → 0.install/stop/start/restart/uninstall --json→ one document each with the rightrunning/installed, prose on stderr;start --jsonwith nothing installed → 4,error: "not installed".logs --json,serve --json,config eject --json,status --dry-run,busy -q,start --from-checkout,update --quiet→ 2.serve -qon a genuinely first run → exactly one stdout line; control without-q→ 6 lines and the welcome on stderr.--json(unit-tested; the busy guard itself is unchanged).For the record (asked by the rollout)
service installover an already-active unit does restart it (wasActive→systemctl --user restart).service start(andrestart) do runreset-failedfirst.🤖 Generated with Claude Code