refactor(cli): talk about sessions, not the daemon behind them - #33
Merged
Conversation
Nothing a person can act on about the daemon is a fact about the daemon. Sessions die with it, sessions hold the build they started under, and sessions are what wants ending — so every line they read says sessions, and the process holding the ptys is never named. `lcc daemon` leaves `usage` but stays dispatchable: `watch_client` re-execs it to bring the host up, and `--foreground` / `--status` are what there is to run when debugging that. Its `--stop` moves to `lcc open --stop-all`, where someone looking for a way to end their sessions would actually look for it. `lcc watch` is gone rather than kept as an alias. One dashboard reached by two names made which flags existed depend on which name you typed; `lcc open` now carries `--json` and `--stop-all`, and rejects them for the xcode target instead of ignoring them. The `--json` keys move with the vocabulary — `daemon_running` and `daemon_outdated` become `sessions_live` and `outdated_build`. Breaking surface, deliberately: nothing outside this repo parses them yet, which makes now the only cheap time. `snapshotJson` is split out so a test pins the names, because a renamed key reads as `null`, and `null` reads as "nothing is running" rather than as a contract that moved.
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.
lcc daemonleavesusagebut stays dispatchable —watch_clientre-execs it to bring the host up, and--foreground/--statusare what there is to run when debugging that.lcc watchis deleted rather than kept as an alias. One dashboard reached by two names made which flags existed depend on which name you typed.lcc opennow carries--jsonand the relocated--stop-all(waslcc daemon --stop), and rejects both for the xcode target instead of ignoring them.--jsonsurface:daemon_running→sessions_live,daemon_outdated→outdated_build. Nothing outside this repo parses them yet, which makes now the only cheap time to move them.snapshotJsonis split out so a test pins the names — a renamed key reads asnull, andnullreads as "nothing is running" rather than as a contract that moved.Review notes
--watch/--no-watchand thewatchByDefaultsetting are untouched and now name a concept with no visible command behind it. Renaming them to--backgroundneeds a migration path for config files already on disk, so it is left as a separate call.