cli: fix org quota help text + add dr enable/disable aliases#298
Merged
Conversation
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>
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>
Contributor
Author
|
/gcbrun |
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.
Two small CLI fixes (bundled).
1. Fix misleading
org quota --quotahelp textFrom a user question on Slack: the help said
Sensor quota (0 to remove limit), which reads as if0makes the quota unlimited.Verified against the backend
doQuotaChange(lc_api-go/service/endpoint_billing.go):--quotasets the org's licensed sensor count (the Stripe subscription quantity). Setting0does 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.--quotahelp →Sensor quota: number of licensed sensors (0 = free tier)._EXPLAIN_QUOTA(AI help) updated to match.2. Add
dr enable/dr disablealiasesD&R rules are hive-backed, but the
drgroup lacked the enable/disable convenience aliases thathive(and the per-hive shortcuts) provide. Added them mirroring the hive pattern:usr_mtd.enabled, routes to the/mtdendpoint.--namespace(general/managed/service).--ai-helpexplain text and unit tests.Tests
Full unit suite green (
3311 passed). Updated the lazy-loading regression test's expecteddrsubcommand set.🤖 Generated with Claude Code