feat(taosctl): observatory command group#1414
Conversation
The Observatory backend (fleet view + pause and concurrency-throttle dials the dispatch loop polls) shipped in #1341/#1343/#1346/#1347/#1365 but had no CLI surface. Observatory's whole point is steering the queue without hand-editing a dispatch script, so a terminal/script control group is a natural fit. Wraps the five routes: fleet, pause-status/pause/resume (global or per-lane), and throttle-status/throttle (--max or --clear). Covered by unit tests and the static route-coverage gate.
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Warning Review limit reached
More reviews will be available in 38 minutes and 40 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| {"scope": "owl-lane-1", "max_concurrent": 3}) in fake.calls | ||
|
|
||
|
|
||
| def test_throttle_clear_sends_null(monkeypatch): |
There was a problem hiding this comment.
WARNING: test_throttle_clear_sends_null only exercises --clear on the implicit global scope (no positional scope arg). The per-lane branch is the more interesting case: on the server, scope == "global" sets state["global"] = None, while any other scope falls into state["lanes"].pop(scope, None) (routes/observatory.py:171) — i.e. removes a previously-set per-lane override. Because that's the only branch where --clear actually deletes an entry rather than just clearing a global, a regression that broke per-lane clear (e.g. silently sending scope="global") would pass all 12 tests. Suggest adding a taosctl observatory throttle owl-lane-1 --clear case that asserts {"scope": "owl-lane-1", "max_concurrent": None} is sent, mirroring the per-lane shape of test_throttle_set_max.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge The single new commit (
No new issues were found on the changed lines. Files Reviewed (2 files)
Previous Review Summary (commit cc1cfb7)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit cc1cfb7)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (2 files)
Reviewed by minimax-m3 · Input: 41.6K · Output: 1.1K · Cached: 137.4K |
| """ | ||
| from __future__ import annotations | ||
|
|
||
| from ..argtypes import positive_int |
There was a problem hiding this comment.
💡 Quality: Relative import differs from all other command modules
observatory.py uses from ..argtypes import positive_int, while all 11 other command modules that use the shared validators import them absolutely as from tinyagentos.cli.taosctl.argtypes import positive_int (jobs.py, scheduler.py, catalog.py, mail.py, etc.). Both work given the package layout, but the inconsistency is gratuitous and slightly harms grep-ability and convention. Suggest matching the established absolute-import style.
Use the absolute import that every other command module uses.:
from tinyagentos.cli.taosctl.argtypes import positive_int
Was this helpful? React with 👍 / 👎
|
Note Your trial team has used its Gitar budget, so automatic reviews are paused. Upgrade now to unlock full capacity. Comment "Gitar review" to trigger a review manually. Code Review 👍 Approved with suggestions 0 resolved / 1 findingsAdds the 💡 Quality: Relative import differs from all other command modules📄 tinyagentos/cli/taosctl/commands/observatory.py:11 observatory.py uses Use the absolute import that every other command module uses.🤖 Prompt for agentsOptionsDisplay: compact → Showing less information. Comment with these commands to change:
Important Your trial ends in 3 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more. Was this helpful? React with 👍 / 👎 | Gitar |
…ar test - Use the absolute argtypes import the 11 other command modules use (gitar Quality nit). - Add a per-lane throttle --clear test; the existing one only covered the implicit global scope (kilo review).
What
Adds the
taosctl observatorycommand group over the existing Observatory API.The Observatory backend (fleet view + queue-control pause and concurrency-throttle dials, polled by the dispatch loop each iteration) shipped in #1341 / #1343 / #1346 / #1347 / #1365 but had no CLI surface. Observatory exists precisely so the queue is steered as a first-class control rather than a hand edit of a local dispatch script (the spec's motivating incident), so a terminal/script control group fits directly.
Verbs
fleet— who is working and what they hold (GET /api/observatory/fleet)pause-status/pause [scope]/resume [scope]— global (default) or per-lane pausethrottle-status/throttle [scope] (--max N | --clear)— set or clear a concurrency capPause/throttle writes are admin-only server side; reads are open to any authenticated caller.
--maxuses the shared positive-int validator;--max/--clearare mutually exclusive and one is required.Tests
tests/test_taosctl_observatory.py— 12 unit tests (scope defaulting, set/clear, mutual exclusion, validation, error mapping)test_taosctl_route_coveragegate