Skip to content

fix(cli): drop the dead --share-usage flag from the help - #312

Merged
adityankale190895 merged 1 commit into
DiffCI:mainfrom
FredApps:cli-drop-share-usage-help
Nov 18, 2026
Merged

adityankale190895 merged 1 commit into
DiffCI:mainfrom
FredApps:cli-drop-share-usage-help

Conversation

@FredApps

Copy link
Copy Markdown
Contributor

Fixes #311

What: removes --share-usage from the diffci verify, check and observe synopsis lines in packages/diffci-cli/src/client/cli.ts.

Why removing, not wiring up: the flag was the opt-in for usage reporting until 0875e89 made counting the default. That commit removed every flags["share-usage"] read and the help sentence for the flag, but left the flag in the synopsis lines. docs/telemetry.md and the help's own telemetry paragraph say:

  • counting is on by default;
  • diffci telemetry --mode count-only|repo picks what is sent;
  • only DO_NOT_TRACK=1, DIFFCI_NO_SEND=1 or DIFFCI_SHARE_USAGE=0 stop counting.

An opt-in flag would do nothing. A flag that turns counting off would contradict the docs, which give environment variables as the only way. DIFFCI_SHARE_USAGE itself is unchanged.

Test: tests/client/cli-help.test.ts now asserts that diffci help doesn't print --share-usage and still names DIFFCI_SHARE_USAGE=0. Without the cli.ts change, the new assertion fails ("help lists --share-usage, which no code reads").

Local checks:

  • Root: npm run typecheck, npm test (1167 pass), npm run build, npm run audit:boundary and npm run agent:check all pass.
  • CLI: npm run typecheck, npm run build and npm run package:check pass.
  • CLI npm test: 517/519. The 2 failures in tests/client/cli-agent.test.ts also fail on unchanged main: a stale diffci verify help regex, and an init install test that depends on the local npm layout.

Both changed files are already in release-files.json.

0875e89 made usage counting the default and removed every read of
--share-usage, but the verify, check and observe synopsis lines still listed
it. Per docs/telemetry.md only DO_NOT_TRACK=1, DIFFCI_NO_SEND=1 or
DIFFCI_SHARE_USAGE=0 stop counting, so an opt-in flag has nothing to do.

The help test now checks the flag is gone and that the help still names
DIFFCI_SHARE_USAGE=0.

Fixes DiffCI#311

Signed-off-by: FredApps <[email protected]>
@FredApps
FredApps marked this pull request as ready for review November 18, 2026 00:55
@adityankale190895
adityankale190895 merged commit 7b884c1 into DiffCI:main Nov 18, 2026
13 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.

CLI help lists --share-usage, which no code reads since counting became the default

2 participants