feat: delete the full-screen interface - #86
Conversation
Step 9 of nicodes/komizo-be#46, and the only irreversible one. Refs nicodes/komizo-be#55. The app is the product now, so the interface is thirteen files and the tests that drew them. What is NOT deleted is any capability: the parity rule is that the CLI can do everything, over SSH, and one thing only the interface knew has moved rather than gone -- whether the agent on a box is behind this komizo. `komizo report` printed the box's version and left the comparison to a reader who would have to know this binary's own version to make it; agentBehind now says it and names the remedy. Two constants came back with the data model they belong to: devLimit is a clamp on a deviation score, not the top of an axis, and chartWindow is the default range every signed read resolves, now defaultWindow. parity_setup_test.go was a hardcoded list of two surfaces, and a list is what let the original bug through -- the interface's path simply was not on it. It now walks the package with go/ast, finds every function that runs the provisioning script, and pins the set, so a third path goes red rather than passing vacuously. Bare `komizo` prints its help and exits 0; a bare address names where the work moved rather than answering with thirty lines of usage. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
go.mod loses every terminal-UI dependency with it -- bubbletea, lipgloss, bubbles, ntcharts and their transitive set, 31 lines of module and 54 of sum. Fewer dependencies in the binary that holds an SSH key to other people's servers is the part of this worth saying out loud. The update help no longer cross-references a keystroke. It named `"u"`, which was the honest reference while there were two surfaces and is now advice that works only if you are looking at a program that does not exist; it names `komizo report` instead, which is what tells you a box is behind. Its test required the old string, so that moved with it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Review 1Request changes. The Reviewed at Baseline (item 7), exit codes checked rather than eyeballed
What holds up
M6 is mine and it matters: the remedy string is asserted, not just the sentence. The one case-by-case difference from the interface — Four of the five BLOCKING1.
|
Review 1 on nicodes/komizo-be#55 walked the deleted screens rather than the diff, and found the parity sweep had missed several. Two of them were worse than a missing read. CHANGING A SETTING ROTATED THE DEPLOY KEY. `keepKey` survived, `performAdd` still honoured it, the box script still documented it -- and the only caller was the interface's `c`. So `komizo add --config NEW` issued the repo a key it does not know about and broke its next deploy for a reason nobody would connect to what they just did. `--keep-key` is that caller. AND THE KNOWN-AS LIST COULD BE ADDED TO BUT NEVER CLEARED, because an empty value means both "I did not say" and "I say: none" and nothing asked the parser which. fs.Visit knows. READING KOMIZO_KNOWN_HOSTS COST A KEY ROTATION -- formatKnownHosts was reachable only through `komizo add`. It is `komizo report --known-hosts`, which reads and writes nothing. VOLUMES, PROCESSOR USE AND REQUEST COUNTS had no command at all. The decoders for all three survived the deletion and became unreachable, which is why the source still looked like it could answer. They are --volumes and --usage on `komizo report`, behind flags because each costs something the plain report does not. AND THE GUARD ITSELF COULD BE WALKED PAST TWO WAYS, both the original bug's shape. It matched the script by NAME, so a package-level alias hid a setup path entirely; and it exempted any selector beginning with "Print", so a runner called PrintAndRun was treated as `komizo script init` -- while rewriting fmt.Print as fmt.Fprint went red for no behavioural change. It now follows the VALUE through its aliases, and asks who the receiver is. caught --volumes never reaches the box caught the volumes are fetched and not printed caught a shared volume is counted once per mounter caught --usage never calls the box caught the processor figure is dropped caught --known-hosts prints nothing caught known_hosts drops the app's own names caught a setup path whose script reference is a package-level var caught a setup path whose runner method is named Print* askBox and ensureReachable become package variables so those assertions run against the real command rather than the decoders -- a capability added without a way to assert it is the next one to go missing quietly. Also: `komizo remove` no longer sends people to the invocation this branch deleted, alpine.sh stops telling deploy logs to press a key in a program that is gone, AGENTS.md stops requiring Bubble Tea's docs, and capture() restores the globals on a panic. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Review 1 replyAll nine blocking fixed. This is the best review I have had on this branch, and finding 2 in particular is one I would not have found by reading the diff — you found it by walking the deleted screens, which is the only method that could have. 2 — a settings change rotated the deploy keyConfirmed and fixed. This is the one that would have hurt somebody: The shape is worth naming, because it is not "a screen was deleted": the capability, the plan field, the script support and the comment explaining it all survived. Only the caller went. Nothing in the type system or the tests notices a struct field with no producer. 3 —
|
…ent (#94) Hit on a real box. `go run github.com/nicodes/komizo@v0.0.17 init` set up Docker, the shared network and the metadata block, then failed at the agent with "this komizo was built without a linux/amd64 agent" -- leaving a server provisioned and unreadable. Not a broken release. The agents are gitignored build artifacts: `make agents` builds them and the release workflow runs it, but the module the Go proxy serves carries bin/.keep and nothing else. So the module form of `go install` and `go run` compiles happily and fails at the one step that puts the agent on the box -- after everything else has already been done to it. The README recommended exactly that as its FIRST command. It leads with the release archive now, and says plainly why the Go path does not work and what does (a checkout, where the Makefile builds the agents first). The error message said "Built from source? Run `make agents`" -- advice a `go install` user cannot take, because they have no checkout. It names that case and points at the releases page. AND A CHECK, because the sentence is easy to reintroduce and nothing else here would notice a documentation defect with a half-provisioned machine at the end of it. The rule is not "never mention go install": from a checkout it is fine. It is that the module form must never appear without the reason it does not work beside it. Also: init.go still said the "monitor" would not work -- the monitor was the interface, deleted in #86. I fixed that wording in update.go and missed the copy here, which is the same instance-not-shape mistake as the CI ceiling. Swept the repository for the class this time; this was the only remaining user-facing one (the komizo_monitor hits are the service account). caught the README stops saying the module install does not work caught the README stops naming make agents caught the README stops showing the working install caught the error stops naming the go install case Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Closes nicodes/komizo-be#55. Step 9 of nicodes/komizo-be#46, and the only irreversible one.
12,302 lines deleted, 406 added. Thirteen
tui_*.gofiles, the tests that drew them, and every terminal-UI dependency ingo.mod.Nothing loses a capability, and one thing gains one
The parity rule is that the CLI can do everything over SSH. Checking that meant reading what the interface knew that no command did, and there was one: whether the agent on a box is behind this komizo.
komizo reportprinted the box's version and stopped. Comparing it required knowing this binary's own version, which is not something a reader has. The interface's server row did the comparison and the command did not, so deleting it would have deleted the answer.agentBehindnow says it and names the remedy:Both signals are kept because each catches what the other misses: a different stamp means the agent binary differs (the version misses this the whole time a build calls itself
dev), and a different version means something else komizo installs changed — a script, a doas rule — which the stamp misses whenever the changed thing is not the agent.The parity test was a list, and a list is what let the original bug through
parity_setup_test.goheld two hardcoded rows:init.goandtui_ops.go. The bug it was written for was that the interface's setup path never registered the server — and that path only got caught because somebody added it to the list by hand. A third path would have passed vacuously.It now walks the package with
go/ast, finds every function that runs the provisioning script, and pins the set. A new setup path goes red before any of the "each path must also do X" rules get a chance to be vacuously true about it.Two constants came back to the model they belong to
devLimitclamps a deviation score. It lived in the monitor screen, where it also happened to be the top of a y axis — but it decides a number this package computes, so it is inmetrics.go.chartWindowis the default range every signed read resolves, nowdefaultWindowintimerange.go.Entry points
Bare
komizoprints its help and exits 0 — asking a tool what it does is not a misuse of it, andkomizo || echo brokenshould not call it broken. A bare address names where the work moved rather than answering with thirty lines of usage.Checks
Five mutations against the new capability, all red:
The last one matters: the first four are all satisfied by printing the warning unconditionally, which would put it on every healthy box.
go build,go vet,gofmt -landgo test ./... -count=1are clean — exit 0, checked rather than eyeballed.Left deliberately
lifecycle.go's comments still say "these existed ONLY in the interface". That is accurate history — one of them anticipates this deletion — and rewriting it to have always been so is what the house style says not to do.