Skip to content

feat(taosctl): observatory command group#1414

Merged
jaylfc merged 2 commits into
devfrom
feat/taosctl-observatory-group
Jun 23, 2026
Merged

feat(taosctl): observatory command group#1414
jaylfc merged 2 commits into
devfrom
feat/taosctl-observatory-group

Conversation

@jaylfc

@jaylfc jaylfc commented Jun 23, 2026

Copy link
Copy Markdown
Owner

What

Adds the taosctl observatory command 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 pause
  • throttle-status / throttle [scope] (--max N | --clear) — set or clear a concurrency cap

Pause/throttle writes are admin-only server side; reads are open to any authenticated caller. --max uses the shared positive-int validator; --max/--clear are mutually exclusive and one is required.

Tests

  • tests/test_taosctl_observatory.py — 12 unit tests (scope defaulting, set/clear, mutual exclusion, validation, error mapping)
  • Passes the static test_taosctl_route_coverage gate
  • Surgical: one new command module + its test, no route changes.

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-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jaylfc, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 09a6b787-0ff6-4639-83cc-9483ba5f75df

📥 Commits

Reviewing files that changed from the base of the PR and between 0fdb721 and 1d63e94.

📒 Files selected for processing (2)
  • tests/test_taosctl_observatory.py
  • tinyagentos/cli/taosctl/commands/observatory.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/taosctl-observatory-group

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread tests/test_taosctl_observatory.py Outdated
{"scope": "owl-lane-1", "max_concurrent": 3}) in fake.calls


def test_throttle_clear_sends_null(monkeypatch):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kilo-code-bot

kilo-code-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The single new commit (1d63e946) addresses both findings from the previous review:

  • test_throttle_clear_specific_lane_sends_null (tests/test_taosctl_observatory.py:96-101) now exercises the per-lane --clear branch (scope=owl-lane-1, max_concurrent=None) — the case that hits state["lanes"].pop(scope, None) on the server side, so regressions in per-lane clear semantics can no longer slip through.
  • from tinyagentos.cli.taosctl.argtypes import positive_int (tinyagentos/cli/taosctl/commands/observatory.py:11) now matches the absolute-import style used by every other taosctl command module.

No new issues were found on the changed lines.

Files Reviewed (2 files)
  • tests/test_taosctl_observatory.py
  • tinyagentos/cli/taosctl/commands/observatory.py
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

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
tests/test_taosctl_observatory.py 88 test_throttle_clear_sends_null only exercises --clear on the implicit global scope; the per-lane branch (state["lanes"].pop(scope, None) in routes/observatory.py:171) is the more interesting case and is not covered.
Files Reviewed (2 files)
  • tinyagentos/cli/taosctl/commands/observatory.py - 0 issues
  • tests/test_taosctl_observatory.py - 1 issue

Fix these issues in Kilo Cloud


Reviewed by minimax-m3 · Input: 41.6K · Output: 1.1K · Cached: 137.4K

"""
from __future__ import annotations

from ..argtypes import positive_int

@gitar-bot gitar-bot Bot Jun 23, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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 👍 / 👎

@gitar-bot

gitar-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

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.
Learn more about usage limits

Code Review 👍 Approved with suggestions 0 resolved / 1 findings

Adds the taosctl observatory command group to enable fleet monitoring and queue control via CLI. Update the relative import in the observatory module to match the existing command structure.

💡 Quality: Relative import differs from all other command modules

📄 tinyagentos/cli/taosctl/commands/observatory.py:11

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
🤖 Prompt for agents
Code Review: Adds the `taosctl observatory` command group to enable fleet monitoring and queue control via CLI. Update the relative import in the observatory module to match the existing command structure.

1. 💡 Quality: Relative import differs from all other command modules
   Files: tinyagentos/cli/taosctl/commands/observatory.py:11

   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.

   Fix (Use the absolute import that every other command module uses.):
   from tinyagentos.cli.taosctl.argtypes import positive_int

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

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).
@jaylfc jaylfc enabled auto-merge (squash) June 23, 2026 17:47
@jaylfc jaylfc merged commit 5a6f1fd into dev Jun 23, 2026
8 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in TinyAgentOS Roadmap Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant