Restore the swag command, and guard against losing one again - #135
Merged
Conversation
#134 dropped `swag` from config/commands.js while help.js and the README kept advertising it, so `help` listed a command that did nothing. My fault: I had edits to commands.js spread across two working trees and consolidated them by copying one file over the other, which silently reverted the two changes #132 had made to it — the command itself and a stale comment above `www`. Both are restored. The new test is the more useful half: nothing linked config/help.js to config/commands.js, so help could advertise a command that did not exist and no test would notice. It now walks every %command% in help.js and asserts a matching function exists. Verified the test fails with the exact diagnostic (expected [ 'swag' ] to deeply equal []) when the command is removed again. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 task
ledwards
added a commit
that referenced
this pull request
Aug 13, 2026
Removed from commands.js, help.js and the README together — the help/commands sync test added in #135 requires that, which is the point of it. Reverts only the command from #132; the README's crawlability rewrite in that PR stays. To bring it back, restore the three lines: config/commands.js swag: function () { term.openURL("https://rootvc.creator-spring.com"); } config/help.js "%swag%": "rootvc store", README.md - swag: rootvc store Co-authored-by: Claude Opus 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.
A regression I introduced in #134, plus the test that should have caught it.
What broke
#134 dropped
swagfromconfig/commands.jswhileconfig/help.jsand the README kept advertising it. On production right now,helplists%swag%and typingswagdoes nothing.My fault, and worth naming precisely: I had edits to
commands.jsspread across two working trees (the repo has a git worktree nested inside it) and consolidated them by copying one file over the other. That file predated #132, so the copy silently reverted both of that PR's changes to it — theswagcommand and a stale comment abovewwwthat described the deleted static mirror.Nothing else from #132 or #133 was affected; they touched different files. Everything #134 added —
cowsay,date,wget, the_rickRoll()consolidation — is intact and verified still present.The guard
The more useful half of this PR. Nothing linked
help.jstocommands.js, so help could advertise a command that didn't exist and no test would notice.The new test walks every
%command%entry inhelp.jsand asserts a matching function exists incommands.js. I verified it actually catches the bug by removingswagagain and confirming the failure:Test plan
npm test— all passingswagis removedcowsay,date,wgetand_rickRollall still present, and zero imgur references remain🤖 Generated with Claude Code