feat(ops): add bounded Worker health reader - #15
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 11, 2026, 3:14 AM ET / 07:14 UTC (Revision 3). ClawSweeper reviewWhat this changesAdds a manual CLI that retrieves and validates 24 hourly Cloudflare Worker request and error estimates, with bounded networking, structured output, tests, and an operator runbook. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: this is useful, distinct operator tooling that current main does not implement. No actionable patch defect was found, and the maintainer-authored contribution is not eligible for automatic cleanup. Priority: P2 Review scores
Verification
How this fits togetherThe telemetry Worker serves update checks and public usage aggregates. This separate operator CLI reads Cloudflare infrastructure metrics and produces hourly JSON estimates without changing the Worker or its stored telemetry. flowchart TD
A[Operator invocation and existing credentials] --> B[Validate inputs and freeze UTC window]
B --> C[One bounded Cloudflare query]
C --> D[Validate response and 24 hourly groups]
D --> E[Projected hourly JSON]
D --> F[Bounded unavailable reason]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain a standalone, bounded operator reader that preserves adaptive estimates and clearly separates Worker execution metrics from telemetry delivery claims. Do we have a high-confidence way to reproduce the issue? Not applicable: this adds an operator capability rather than repairing a reported existing-behavior failure. Is this the best way to solve the issue? Yes: a separate manual CLI fits the infrastructure-metrics boundary, and the fixed query, bounded transport, and strict projection avoid expanding public telemetry behavior. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against 5eff9fe714d9. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
What Problem This Solves
Operators need a narrow, manual view of native Worker traffic and execution
health. Those metrics are separate from feature-recording outcomes and do not
prove telemetry delivery.
Changes
npm run --silent worker:healthfor the fixedopenclaw-telemetryWorkerusing existing
CLOUDFLARE_API_TOKENandCLOUDFLARE_ACCOUNT_IDenvironmentinputs.
cumulative ten-second deadline, a 64 KiB response cap, and no retries or
redirects.
estimates and report bounded available/unavailable results.
bd314c2bab12db17263198257bb452fd081d30d1.The health module, CLI, tests, and runbook are unchanged from the previous
reviewed head. Main's removed public dashboard and statistics endpoint stay
removed; the obsolete stats-secret paragraph is not restored.
Scope And Limits
This is manual operator tooling, not a public dashboard or scheduled collector.
It changes no Worker runtime, client collection, logging, storage, or deployment
configuration. There is no credential discovery, OAuth refresh, credential
persistence, or grant change.
Worker metrics aggregate all routes and domains and exclude WAF-blocked
requests. Invocation statuses are not HTTP status codes. These estimates do
not establish feature validation, quota outcomes, durable Analytics Engine
acknowledgement, unique users, or delivery success.
Validation
npm run checkon Node.js 24.19.0: vocabulary validation,typechecking, and 401 tests across 12 files passed.
deploy --dry-run: passed./api/statsreturns404withCache-Control: no-store, update checks still succeed, and thehomepage contains privacy information without a dashboard.
whitespace/privacy checks passed.
passed for
4242c1b6e2d4251c6be2f45a8a8976dc2e0e8b4d: Node.js 24clean install, full check, and Wrangler dry-run. CodeQL checks also passed.
The PR deployment job was intentionally skipped.
Historical Live Proof
On 2026-09-09, one bounded CLI invocation returned
availablewithreason
okand validated 24 hourly rows for[2026-09-08T00:00:00Z, 2026-09-09T00:00:00Z).It exited successfully and its child was joined, without credential refresh
or retry.
The query, transport, credential handling, and CLI are unchanged. This is
historical response-contract evidence, not a claim of current authentication
or current production health. No raw metrics are published.
Release Note
Adds a manual, bounded Worker-health CLI for aggregate infrastructure metrics
without changing production telemetry collection.