Skip to content

cli: fix org quota help text + add dr enable/disable aliases#298

Merged
maximelb merged 2 commits into
cli-v2from
cli-fix-quota-help
May 28, 2026
Merged

cli: fix org quota help text + add dr enable/disable aliases#298
maximelb merged 2 commits into
cli-v2from
cli-fix-quota-help

Conversation

@maximelb
Copy link
Copy Markdown
Contributor

@maximelb maximelb commented May 28, 2026

Two small CLI fixes (bundled).

1. Fix misleading org quota --quota help text

From a user question on Slack: the help said Sensor quota (0 to remove limit), which reads as if 0 makes the quota unlimited.

Verified against the backend doQuotaChange (lc_api-go/service/endpoint_billing.go): --quota sets the org's licensed sensor count (the Stripe subscription quantity). Setting 0 does not remove the limit — it puts the org on the free tier (no paid quota; values 1–2 also collapse to 0). The wording was exactly backwards.

  • --quota help → Sensor quota: number of licensed sensors (0 = free tier).
  • _EXPLAIN_QUOTA (AI help) updated to match.

2. Add dr enable / dr disable aliases

D&R rules are hive-backed, but the dr group lacked the enable/disable convenience aliases that hive (and the per-hive shortcuts) provide. Added them mirroring the hive pattern:

  • Reads record metadata first (preserves tags/expiry/comment), toggles only usr_mtd.enabled, routes to the /mtd endpoint.
  • Honors --namespace (general/managed/service).
  • Includes --ai-help explain text and unit tests.

Tests

Full unit suite green (3311 passed). Updated the lazy-loading regression test's expected dr subcommand set.

🤖 Generated with Claude Code

The --quota option claimed "0 to remove limit", implying 0 makes the
quota unlimited. The backend (doQuotaChange) sets the value as the org's
licensed sensor count (Stripe subscription quantity); 0 puts the org on
the free tier (no paid quota), the opposite of "remove limit". Updated
the option help and the AI explain text to match.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maximelb maximelb requested a review from dzimine-lc May 28, 2026 22:10
@maximelb maximelb marked this pull request as ready for review May 28, 2026 22:10
@maximelb maximelb closed this May 28, 2026
@maximelb maximelb reopened this May 28, 2026
D&R rules are hive-backed, but the dr command group lacked the
enable/disable convenience aliases that hive (and the per-hive
shortcuts) provide. Add them mirroring the hive pattern: read the
record metadata first (preserving tags/expiry/comment) and toggle only
usr_mtd.enabled, routing to the /mtd endpoint. Honors --namespace
(general/managed/service). Includes --ai-help explain text and unit
tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maximelb maximelb changed the title cli: fix misleading org quota --quota help text cli: fix org quota help text + add dr enable/disable aliases May 28, 2026
@maximelb
Copy link
Copy Markdown
Contributor Author

/gcbrun

@maximelb maximelb merged commit 3e48830 into cli-v2 May 28, 2026
7 checks passed
@maximelb maximelb deleted the cli-fix-quota-help branch May 28, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant