Skip to content

fix(crawlproof): crawlproof update updates it - #58

Merged
ralyodio merged 1 commit into
masterfrom
crawlproof-update-verb
Sep 6, 2026
Merged

fix(crawlproof): crawlproof update updates it#58
ralyodio merged 1 commit into
masterfrom
crawlproof-update-verb

Conversation

@ralyodio

@ralyodio ralyodio commented Sep 6, 2026

Copy link
Copy Markdown
Contributor
mosh ▸ /cli-tools crawlproof update
unknown command: update
crawlproof — what the fleet costs and what it returns
...usage...
· cli-tools exited (code 2)

The wrapper spells its own flags --self-* so that every plain word belongs to upstream. That is the right default and it was the wrong answer here: update is the word cli-tools update already uses in this repo, so typing it and getting the dashboard's usage back is the command being wrong rather than the person.

The wrapper now claims exactly three words — update, upgrade, self-update — and only in first position, so crawlproof ads budget update still reaches upstream untouched.

This is the one place the rule is safe to break: installing is the wrapper's job and can never come to mean something in the dashboard. The comment says so, next to the exception.

wantsSelfUpdate lives in src/crawlproof.ts and is exported, so the tests exercise the real predicate rather than a copy of the word list — the first draft of these tests asserted a duplicated constant against itself, which is worse than no test.

Verified

$ crawlproof update
crawlproof: installing @profullstack/crawlproof@latest
crawlproof: installed with pnpm

$ crawlproof stats crawlproof.com --range=1d
crawlproof.com  1d  humans
167 visitors, 58 pageviews

Update works, and a plain word still passes straight through.

Heads up: master is red

test/root-ubuntu.test.ts > the groups subcommand > is peeled off before the root check fails on master as of #56, unrelated to this change — this branch touches only bin/crawlproof.ts, src/crawlproof.ts and test/crawlproof.test.ts, while that test reads root-ubuntu.sh. Everything else is green: 731 passing, 21 in the crawlproof module.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HvWJ4336pxTFRdRbvsTQeD

`/cli-tools crawlproof update` printed the dashboard's usage and exited 2. The
wrapper spells its own flags `--self-*` so that every plain word belongs to
upstream, which is the right default and was the wrong answer here: `update` is
the word `cli-tools update` already uses in this repo, so getting usage back is
the command being wrong rather than the person.

So the wrapper claims exactly three words -- update, upgrade, self-update -- and
only in first position, which keeps `crawlproof ads budget update` upstream's.
Installing is the wrapper's job and can never come to mean something in the
dashboard, so this is the one place the rule is safe to break.

The predicate lives in src/ and is exported, so the tests exercise the real
thing rather than a copy of the word list.

Note: test/root-ubuntu.test.ts fails on master as of #56, unrelated to this.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HvWJ4336pxTFRdRbvsTQeD
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

ThreatCrush Security Scan

12 finding(s)

HIGH/CRITICAL: 4 | MEDIUM: 4 | LOW: 4

Severity Rule Location
HIGH sh-remote-script-execution root-ubuntu.sh:2418
HIGH sh-remote-script-execution root-ubuntu.sh:2419
HIGH sh-remote-script-execution root-ubuntu.sh:4026
HIGH sh-remote-script-execution root-ubuntu.sh:4030
MEDIUM sh-remote-script-execution root-ubuntu.sh:4179
MEDIUM sh-remote-script-execution root-ubuntu.sh:5241
MEDIUM redos-nested-quantifier src/domain-free.ts:56
MEDIUM redos-nested-quantifier src/mail.ts:1042
LOW secret-generic-credential src/credentials.ts:36
LOW secret-generic-api-key test/credentials.test.ts:208
LOW secret-generic-credential test/mail.test.ts:135
LOW secret-generic-credential test/shorten.test.ts:36

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 8bb42a0 into master Sep 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant