Repository navigation
feat(telemetry): aggregate identifier-free reporting installation counts - #32
Merged
Merged
Conversation
Receiver for openclaw/openclaw#186569. Successful update answers advertise the server UTC day only when the optional INSTALLATION_COUNTS D1 binding exists; a separate empty count-only POST increments an aggregate (day, gap, reports) histogram with 90-day pruning. Production stays unbound. Recovered from stalled Team publication 3f1ba16c (push never confirmed). Co-authored-by: roboclaw-bot <309084314+roboclaw-bot@users.noreply.github.com>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
October 30, 2026 11:49
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Receiver for the merged client openclaw/openclaw#186569. Implemented by Roboclaw on Team; its automatic publication (operation
3f1ba16c) stalled with an unconfirmed push, so this PR recovers the identical reviewed tree and finishes it from a maintainer checkout.What Problem This Solves
Daily update-check event totals cannot estimate unique reporting installations without retaining a cross-request identifier or receiving client-regulated contributions.
User Impact
A compatible client can contribute to private daily/weekly/monthly reporting-installation estimates while the receiver retains only aggregate
(day, gap, reports)totals: no individual count requests, identifiers, geography, versions or feature inventory. Ordinary update and outcome behavior stays available.Collection remains disabled in production:
wrangler.jsoncgains no D1 binding and no cron trigger (asserted bytest/deployment.test.ts). Activation needs a separately configured D1 binding, the migration, scheduled cleanup with monitoring, and review of provider recovery retention. Estimates describe reporting installation-state roots, not people or engagement.Why This Change Was Made
Fresh successful ordinary update answers advertise
OpenClaw-Installation-Count: 1;<server UTC day>(withno-store) only when the optional store is bound. A separate empty POST (User-Agent: openclaw-installation-count/1,OpenClaw-Installation-Count: 1;<day>;<gap 1-31>) is routed before legacy analytics and geography, including malformed traffic. Body framing is validated without reading the stream, the day is revalidated at the write boundary, and a transactional D1 batch prunes past 90 days and upserts the cell. The privacy page and README disclose the flow and opt-outs. This matches the merged client's header, user-agent and gap contract exactly.Evidence
npm run checkon this branch rebased onto currentmain(536a3c9): vocabulary check,tsc --noEmit, and Vitest 16 files / 590 tests passed, including 49 installation-count tests that drive real workerd + persisted local D1 (concurrent increments, restart persistence, malformed/duplicate headers, outcomes, missing storage, UTC boundaries, retention, stalled chunked upload rejected with zero body reads).wrangler devofmainand this branch:Before:

After:
