Skip to content

W-426: scope stats feature-usage to real features + add Quick Access metrics + telemetry lint#140

Merged
wr merged 1 commit into
mainfrom
wells/w-426-stats-coverage
Jun 22, 2026
Merged

W-426: scope stats feature-usage to real features + add Quick Access metrics + telemetry lint#140
wr merged 1 commit into
mainfrom
wells/w-426-stats-coverage

Conversation

@wr

@wr wr commented Jun 22, 2026

Copy link
Copy Markdown
Owner

What

Brings the anonymous-stats pipeline back in sync and scopes the public Feature Usage to features that matter.

Feature coverage

  • The worker ingested 13 feature keys but the page labelled 9, so the per-mode trigger flags rendered as raw camelCase and minutiae (Require ::, Arrow conversion) showed as full tiles.
  • Split ingest from publish: FEATURE_KEYS keeps everything (debug view), a curated/ordered PUBLIC_FEATURE_KEYS is what the page shows.
  • Added missing coverage: the emoji trigger (disableable now), a combined triggersCustom, and the easter-egg master switch.

Quick Access metrics

  • quickAccess insertion total + a quickAccessActive daily-active tick (a pick from the favorites pill).
  • favoritesCount distribution → favorites-pinned adoption.
  • favorite_daily top-favorites histogram (hexcodes only, same privacy posture as top emoji).

Telemetry lint

  • scripts/check_telemetry.py + .github/workflows/telemetry.yml fail the build when the Swift client / worker ingest / published set drift. Parallel to the i18n check.

Test plan

  • Debug build ✓, scripts/run-tests.sh
  • Worker node --check + mock-D1 smoke test ✓ (QA DAU & favorites math, curated ordering, bad-hex rejection)
  • python3 scripts/check_telemetry.py ✓ (incl. in-memory drift detection)

Deploy notes

  • Worker needs npm run deploy + npm run db:init:remote (adds favorite_daily; idempotent CREATE IF NOT EXISTS).
  • App telemetry rides the next release; stats page changes land separately on gh-pages.

Refs W-426

…metrics

The stats pipeline had drifted: the worker ingested 13 feature keys but the
public page only labelled 9, so the per-mode trigger flags rendered as raw
camelCase, and minutiae (Require ::, Arrow conversion) showed as full tiles.

Decouple ingest from publish — keep ingesting everything for the debug view,
but curate the published set (PUBLIC_FEATURE_KEYS) to the features that matter,
in a stable order. Add coverage that was missing: the emoji trigger (now
disableable), an "any trigger customized" rollup, and the easter-egg master
switch.

New Quick Access depth: a daily-active signal (a pick from the favorites pill),
favorites-pinned adoption, and a top-favorites histogram (hexcodes only, same
privacy posture as top emoji).

check_telemetry.py + a CI workflow (parallel to the i18n check) fail the build
when the three telemetry layers drift, so "added a feature, forgot the stats"
can't ship silently.

Worker deploy + `npm run db:init:remote` needed for the new tables/logic.

Refs: W-426
@linear-code

linear-code Bot commented Jun 22, 2026

Copy link
Copy Markdown

W-426

@github-actions

Copy link
Copy Markdown
Contributor

🤖 pr-review skipped — this PR modifies .github/workflows/*, and claude-code-action's OIDC token exchange requires workflow files on the PR branch to be byte-identical to main. Merge once approved; PRs that do not touch workflows will be reviewed normally. (trace: 3eff6f3b)

@wr wr merged commit 27d02df into main Jun 22, 2026
6 checks passed
@wr wr deleted the wells/w-426-stats-coverage branch June 22, 2026 16:18
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