Skip to content

Adoption shows live domain activity and a software versions table - #1687

Merged
zlareb1 merged 7 commits into
mainfrom
fix/live-domain-adoption
Nov 28, 2026
Merged

zlareb1 merged 7 commits into
mainfrom
fix/live-domain-adoption

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Related: #1686

Changelog category

  • Improvement

Changelog entry

The adoption directory shows per-domain activity during the day. Software versions appear in a single table.

Why

The directory can show a domain name with blank activity columns until the first completed daily report. The software version table gives readers the version pairs and installation counts in one place.

Scope and risk

The adoption worker sends aggregate activity for eligible domains every five minutes using the existing telemetry switch and namespace filters. The snapshot covers the UTC day through its observation timestamp. A fixed query budget limits each snapshot to five million rows and 512 MiB of reads. Completed report delivery has its own path. The warehouse uses one snapshot per installation and day. Completed daily counts take precedence for each domain. While a recent snapshot is available, a completed report that lists the domain can supply its final request count and observed version. The snapshot supplies users and processes when completed domain activity is absent. The visible directory checks every minute with its search state in a POST body. The refresh also updates the overview's active-domain total.

Snapshots have a two-day retention period and contain aggregate counts and version labels. The public views exclude smoke and internal installations. The completed reports still provide long-term history and aggregate installation, feature, and model usage.

The website removes the version selector and charts. The public Query API SQL omits the version trends field and retains the version table.

Compatibility, rollout and rollback

  • The collector accepts schema version 4 for live domain snapshots alongside completed report versions 1 through 3. A snapshot acknowledgement identifies the installation and observation timestamp. There is no new setting.
  • Apply deploy/telemetry/warehouse.sql to the analytics warehouse and grant the collector INSERT on the snapshot table. Update the saved Query API SQL and deploy the website and collector before deploying the reporting worker.
  • Roll back the worker first. Completed telemetry works with the earlier collector. Stored snapshots expire under their retention policy.

Tests

  • make format-check, make lint, and make typecheck passed.
  • 156 adoption and worker registry tests passed. They cover snapshot delivery, rollover to completed reports, and private or internal exclusions.
  • 287 documentation and worker snapshot tests passed. A ClickHouse query log probe with 500,000 events and no eligible contact domains confirmed that the snapshot query read zero ledger rows. The same fixture size with an eligible domain produced all counts under the budget and skipped publication when the probe lowered the row limit.
  • Three adoption integration tests and 12 SQL analyzer tests passed against an isolated migrated database.
  • 33 tests passed with node --test docs/lib/adoption-{collector,data,view,chart-series}.test.mjs.
  • npm --prefix docs run build passed. A render against fixture warehouse data showed live domain counts and the software version table. A browser-script probe verified the minute interval, POST refresh, and synchronized directory and overview updates with preserved horizontal scroll.

AI assistance in the code

  • AI-generated (Codex). Verified the worker, collector, warehouse rollups, and rendered page.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Local format, lint, type checks and focused tests pass.
  • Worker references and snapshots are regenerated.
  • The docs cover the payload, retention and rollout order.
  • Commits are signed off.

Note

Medium Risk
Changes the adoption telemetry pipeline, warehouse rollups, and public dashboard with a coordinated deploy order; snapshot data is aggregate-only but affects how contact domains appear publicly before day completion.

Overview
Adds live domain activity to adoption telemetry: the adoption_telemetry worker now runs every five minutes (was hourly) and POSTs schema version 4 snapshots of eligible contact domains for the current UTC day, alongside existing 12-hour completed reports. Snapshots are capped at 2,000 domains and skip delivery when ClickHouse read limits (5M rows / 512 MiB) are exceeded.

The collector validates snapshots and inserts into new adoption_domain_snapshots (2-day TTL). Warehouse views (loom_adoption_live_domains, disclosed domains, domain accounts) merge snapshots with completed daily reports, preferring final completed counts when available while using recent snapshots for in-day activity.

The public adoption page drops version trend charts and shows software versions in a single table. The domain directory auto-refreshes every minute via a POST fragment that updates the directory and active-domain overview. Query API SQL removes version_trends. Rollout requires applying warehouse.sql, deploying collector and site, then workers.

Reviewed by Cursor Bugbot for commit 8356d5c. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Nov 28, 2026 9:13am UTC
loom-telemetry Ready Ready Preview Nov 28, 2026 9:13am UTC

Request Review

Publish snapshots of the current UTC day so the domain directory can show activity before the day closes. Show the software version pairs in one table.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Keep a recent snapshot when a completed report still lists the domain and omits its counts. Filter the ledger to eligible namespaces before aggregation. Keep the software versions table as the only version display.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Refresh with a private form submission and update the active domain count alongside the table. Use the report timestamp to select the latest Loom version.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Use completed requests and recent distinct counts when a daily report omits details. Preserve the table scroll position during a browser refresh.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Keep completed report delivery independent of the snapshot budget. Use final metadata whenever the recent-snapshot fallback uses completed request totals.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Stub the live snapshot read so the completed report size tests cover the same delivery path.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Render the directory and its count for the background request. Keep the earliest report versions visible and record the fixed snapshot limits enforced by the collector.

Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
@zlareb1
zlareb1 force-pushed the fix/live-domain-adoption branch from 21029c6 to 8356d5c Compare November 28, 2026 09:11
@zlareb1
zlareb1 merged commit fc2143e into main Nov 28, 2026
53 of 55 checks passed
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.

1 participant