Skip to content

perf(monitor): one request per skill so the full baseline fits in CI#18

Merged
Ap6pack merged 1 commit into
mainfrom
claude/monitor-halve-requests
Jul 6, 2026
Merged

perf(monitor): one request per skill so the full baseline fits in CI#18
Ap6pack merged 1 commit into
mainfrom
claude/monitor-halve-requests

Conversation

@Ap6pack

@Ap6pack Ap6pack commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Description

The full baseline sweep kept running to the 60-min CI timeout and committing nothing. Root cause is scale, not a bug: ClawHub rate-limits at 120 req/min (~2/s) and the sweep made two requests per skill (a get_skill detail call + the file), so a few-thousand-skill registry needs 10k+ requests → over an hour at the limit. Retries (correctly) wait on the limit rather than bypass it, and the snapshot only commits after scanning everything — so a timed-out baseline saves nothing and no baseline ever forms.

Fix: the enumeration listing already returns everything the record needs except the file — slug, version, updated_at, display_name, and install count. Carry that through (SkillMeta) and drop the redundant per-skill get_skill() call, so a scanned skill costs one request (the file). That roughly halves crawl time and brings a full sweep within the rate budget.

Trade-off: per-skill publisher and moderation flags are no longer captured by the sweep. The scan verdict, version, and installs are — and nothing in the diff/report logic used the dropped fields (verified).

This composes with the incremental logic (#16) and retries (#17): first full run is the one-time cost, daily runs only touch changed skills.

Type of Change

  • Performance / scale fix

Checklist

  • Tests updated + added (test_one_request_per_skill_no_detail_fetch; listing now carries installs) — 1589 pass, 16 skipped
  • ruff + mypy clean
  • Docs updated (docs/crawl.md)

🤖 Generated with Claude Code

https://claude.ai/code/session_01DNoTXU8k3pfSBzR7aJubqL


Generated by Claude Code

The full registry sweep made two requests per skill (metadata + file), so
at ClawHub's 120 req/min rate limit a full baseline of a few thousand skills
could not finish inside a 60-min CI window — and since the snapshot only
commits after scanning everything, timed-out runs saved nothing.

Harvest per-skill metadata (version, updated_at, display name, installs)
from the enumeration listing instead and drop the per-skill get_skill()
detail call, so a scanned skill costs a single request (the file). This
roughly halves crawl time and keeps a full sweep within the rate budget.

Trade-off: publisher and moderation flags are no longer captured by the
sweep (verdict, version, and installs are); nothing in the diff/report
depended on them.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DNoTXU8k3pfSBzR7aJubqL
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

✅ Malwar Scan Results

Metric Value
Verdict CLEAN
Risk Score 0/100
Findings 0

Scanned by Malwar — malware detection for agentic AI skills.

@Ap6pack Ap6pack merged commit 695638a into main Jul 6, 2026
6 checks passed
@Ap6pack Ap6pack deleted the claude/monitor-halve-requests branch July 6, 2026 06:51
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.

2 participants