feat(telemetry): add aggregate capture pilot - #18
vincentkoc wants to merge 2 commits into
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 14, 2026, 11:44 PM ET / September 15, 2026, 03:44 UTC (Revision 4). ClawSweeper reviewWhat this changesAdds a dry-run-default operator command that captures one closed UTC day of hourly telemetry reports and separate country estimates into a private bundle with offline verification. Merge readiness⛔ Blocked before merge - 2 items remain This remains distinct, useful work beyond current main. No actionable introduced defect was found, but the MEMBER-authored PR retains an explicit authenticated-acceptance landing hold. Priority: P2 Review scores
Verification
How this fits togetherThe telemetry Worker records update-request reports in Cloudflare Analytics Engine. This operator tool reads aggregate reports and HTTP country estimates, then passes saved reports through the existing offline exporter. flowchart TD
A[Operator selects UTC day] --> B{Execute or verify?}
B -->|Neither| C[Dry-run plan]
B --> D[Validate private destination]
D -->|New capture| E[Read Cloudflare aggregates]
D -->|Existing bundle| F[Offline validation and regeneration]
E --> F
F --> G[Verified private bundle]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the manual, private capture boundary and unchanged exporter semantics, with demonstrated account-specific query compatibility and byte-identical offline verification. Do we have a high-confidence way to reproduce the issue? Not applicable: this adds an acquisition capability rather than fixing a reported existing-behavior bug; production acceptance remains explicitly uncompleted. Is this the best way to solve the issue? Yes, for the approved pilot scope: acquisition reuses the existing exporter and containment helpers without changing their contracts or adding unattended storage. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against 635334fe8733. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Summary
npm run telemetry:capturefor one explicit closed UTC day, with aside-effect-free dry run by default.
scoped HTTP country query. Preserve sampled estimates, exact SQL/wire
hashes, receipts, missing coverage, and byte-identical offline regeneration.
checkout guard, and removal of the public statistics surface.
worktree before existing-bundle handling, credentials, writes, or requests.
outside the bundle and all telemetry checkouts, including filesystem case
aliases, before creating a temporary directory.
Safety And Scope
Execution still requires separate operator-provided AE and HTTP read tokens,
explicit account/zone identity, and an operator-selected private output.
There is no credential discovery, refresh, provisioning, or persistence.
Existing complete bundles verify offline without credentials or requests,
including after upstream retention expires. Private destinations and unrelated
private repositories outside telemetry checkouts remain supported.
The approved storage, retention, and operations scope is unchanged; those
decisions are not awaiting further approval. Permanent operator-input and
private-output requirements still apply to each invocation.
Queries, transport, quota/lookback semantics, strict response schemas, and the
CLI interface are unchanged by this repair. Both source contracts must validate
before completion. Partial/conflicting bundles fail without repair, overwrite,
resume, or automatic retries.
This remains a manual aggregate-capture pilot, not a scheduled, row-level,
lossless, version/plugin, or finer-geography backup. HTTP estimates are not
joined to AE reports or converted into users. No Worker runtime, dependency,
schema, upload, storage binding, retention policy, unattended credential, or
backup job is added. Backup automation in
#20 is closed for now and remains
outside this PR. Settled privacy disclosures are unchanged.
Validation
npm run checkon Node.js 24.19.0: vocabulary consistency,typechecking, and 461 tests across 13 files passed.
deploy --dry-run: passed.capture from source and linked fixtures reached forbidden credential reads;
a scratch case alias physically inside a bundle incorrectly returned
unchanged.filesystem case aliases, successful unrelated private destinations,
side-effect-free planning, offline reruns, and immutable content/mtime
snapshots. All payloads are synthetic.
passed for
c1c57cc626628d99ec17ceb0c78dda86436260ab: Node.js 24clean install, full check, and Wrangler dry-run. CodeQL and both Analyze
checks passed; deployment was intentionally skipped.
Landing Hold
Do not merge yet. Authenticated execution of the exact production queries
with the strict AE/HTTP response schemas, followed by successful offline
verification, has not been completed. Exact-head hosted CI has passed.
Local synthetic proof does not waive this remaining acceptance gate. No raw production
metrics, credentials, or private source identities are published.