Skip to content

feat(cli): record map entry point counts by kind and sensitivity in telemetry - #564

Merged
HugoRCD merged 1 commit into
mainfrom
EVL-286/map-telemetry-entry-point-kinds
Aug 11, 2026
Merged

feat(cli): record map entry point counts by kind and sensitivity in telemetry#564
HugoRCD merged 1 commit into
mainfrom
EVL-286/map-telemetry-entry-point-kinds

Conversation

@evlogai

@evlogai evlogai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Implements EVL-286: evlog map telemetry now records entry point counts by kind, and dark entry points per kind.

What is recorded

Per kind (the closed RouteKind set), totals and dark counts:

  • mapKindApi / mapDarkApi
  • mapKindPage / mapDarkPage
  • mapKindMiddleware / mapDarkMiddleware
  • mapKindServerAction / mapDarkServerAction
  • mapKindCron / mapDarkCron
  • mapKindWebsocket / mapDarkWebsocket

A kind absent from the project is omitted rather than sent as zero, consistent with flags left at their default. A kind that is present but fully covered reports its dark count as 0, so the pair reads as "12 pages, 3 dark" and never as a missing number.

Sensitivity split: decided yes

Same shape for sensitivity, with the reasoning from the issue's open question:

  • mapSensitiveMoney / mapDarkMoney, mapSensitiveAuth / mapDarkAuth, mapSensitivePii / mapDarkPii

Dark money handlers across the population is the sharpest argument the project has for why any of this matters, and it costs nothing extra: the tally is the same loop with sensitivityLabel instead of route.kind. The heuristic caveat is documented in the CLI telemetry docs, so the counts read as what the classifier found, not ground truth. Labels follow sensitivityLabel precedence (money > auth > pii), so the buckets stay disjoint and mapSensitive still equals mapSensitiveMoney + mapSensitiveAuth.

Supporting changes

  • mapTelemetryFieldNames() now lists the kind and sensitivity fields explicitly, since the empty synthetic scan cannot name a kind that is omitted from the payload (the disclosure stays complete).
  • sensitivityLabel() return type tightened from string to the actual 'money' | 'auth' | 'pii' | '' union so the tally can be typed without a cast.
  • apps/telemetry ingest allowlist extended with the 18 new field names; the cross-boundary test (accepts every field evlog map can set) passes.
  • CLI telemetry docs page updated with the new rows and the omission/heuristic conventions.
  • Changeset added (@evlog/cli patch).

Checks

  • pnpm --filter @evlog/cli lint — pass
  • tsc --noEmit on packages/cli — clean for touched files (fixture errors are pre-existing and unrelated)
  • pnpm --filter @evlog/cli exec vitest run — 456 passed
  • pnpm --filter evlog-telemetry lint, typecheck — pass
  • pnpm --filter evlog-telemetry exec vitest run — 190 passed, including allowed-tools.test.ts

@changeset-bot

changeset-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c72be5d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@evlog/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
evi Ready Ready Preview Aug 11, 2026 8:32pm
evlog-docs Ready Ready Preview, v0 Aug 11, 2026 8:32pm
evlog-render-lab Ready Ready Preview Aug 11, 2026 8:32pm
evlog-telemetry Ready Ready Preview Aug 11, 2026 8:32pm
just-use-evlog Ready Ready Preview Aug 11, 2026 8:32pm

Request Review

@evlogai
evlogai Bot requested a review from HugoRCD August 11, 2026 20:29
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

@pkg-pr-new

pkg-pr-new Bot commented Aug 11, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@evlog/cli@564
npm i https://pkg.pr.new/evlog@564
npm i https://pkg.pr.new/@evlog/nuxthub@564
npm i https://pkg.pr.new/@evlog/telemetry@564

commit: c72be5d

@HugoRCD
HugoRCD merged commit b45eed5 into main Aug 11, 2026
19 checks passed
@HugoRCD
HugoRCD deleted the EVL-286/map-telemetry-entry-point-kinds branch August 11, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant