Skip to content

feat(monitor): budgeted, resumable baseline (--max-scans)#19

Merged
Ap6pack merged 1 commit into
mainfrom
claude/monitor-resumable-baseline
Jul 6, 2026
Merged

feat(monitor): budgeted, resumable baseline (--max-scans)#19
Ap6pack merged 1 commit into
mainfrom
claude/monitor-resumable-baseline

Conversation

@Ap6pack

@Ap6pack Ap6pack commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Description

Empirically confirmed over five runs: a single-run full baseline can't complete. ClawHub throttles to ~2 req/s, the registry is ~6k skills, so even at 1 request/skill a full sweep needs ~50+ min before LLM escalation — past the CI timeout. And since the snapshot only commits after scanning everything, every timed-out run saved nothing → no baseline ever formed.

Fix — make the baseline resumable instead of all-or-nothing:

  • build_snapshot(scan_budget=N) caps how many skills are actually fetched + scanned per run. The overflow is recorded as UNKNOWN placeholders (metadata only, no error). Because UNKNOWN records don't count as "unchanged", the next run re-scans them — so the baseline builds up over successive runs, then steady-state daily runs only touch what changed.
  • crawl monitor --max-scans N exposes it; each snapshot records scanned_count / reused_count / pending_count.
  • The workflow passes --max-scans 1500 (~one CI run's worth at the rate limit), so the full baseline converges over a few runs rather than dying to a timeout.

This composes with everything prior: incremental (#16), retries (#17), one-request-per-skill (#18). Net effect: the monitor now reliably makes progress every run and self-heals into a complete baseline.

Type of Change

  • Feature / reliability fix

Checklist

  • Tests added (budget defers overflow; baseline converges over runs; no-budget scans all) — 1592 pass, 16 skipped
  • ruff + mypy clean, workflow YAML validated
  • Docs updated (docs/crawl.md)

🤖 Generated with Claude Code

https://claude.ai/code/session_01DNoTXU8k3pfSBzR7aJubqL


Generated by Claude Code

ClawHub is rate-limited to ~2 req/s, so a full ~6k-skill registry sweep
takes >60 min and can't finish in one CI run — and because the snapshot
only commits after scanning everything, every timed-out baseline saved
nothing. (Confirmed empirically: five runs, none completed.)

Make the baseline resumable:

- build_snapshot() gains scan_budget: cap how many skills are actually
  fetched+scanned per run; the overflow is recorded as UNKNOWN placeholders
  (metadata only, no error). Because UNKNOWN records aren't 'unchanged',
  the next run re-scans them — so the baseline builds up over successive
  runs and then daily incremental only touches what changed.
- crawl monitor --max-scans N wires it; snapshot records pending_count.
- Workflow passes --max-scans 1500 (~one CI run's worth) so the baseline
  converges over a few runs instead of timing out.

Tests: budget defers overflow, baseline converges over runs, no-budget
scans all. Docs updated.

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 27aa67f into main Jul 6, 2026
6 checks passed
@Ap6pack Ap6pack deleted the claude/monitor-resumable-baseline branch July 6, 2026 06:50
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