feat(cli): record map entry point counts by kind and sensitivity in telemetry - #564
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: c72be5d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Thank you for following the naming conventions! 🙏 |
commit: |
HugoRCD
approved these changes
Aug 11, 2026
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.
Implements EVL-286:
evlog maptelemetry now records entry point counts by kind, and dark entry points per kind.What is recorded
Per kind (the closed
RouteKindset), totals and dark counts:mapKindApi/mapDarkApimapKindPage/mapDarkPagemapKindMiddleware/mapDarkMiddlewaremapKindServerAction/mapDarkServerActionmapKindCron/mapDarkCronmapKindWebsocket/mapDarkWebsocketA 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/mapDarkPiiDark 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
sensitivityLabelinstead ofroute.kind. The heuristic caveat is documented in the CLI telemetry docs, so the counts read as what the classifier found, not ground truth. Labels followsensitivityLabelprecedence (money > auth > pii), so the buckets stay disjoint andmapSensitivestill equalsmapSensitiveMoney + 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 fromstringto the actual'money' | 'auth' | 'pii' | ''union so the tally can be typed without a cast.apps/telemetryingest allowlist extended with the 18 new field names; the cross-boundary test (accepts every field evlog map can set) passes.@evlog/clipatch).Checks
pnpm --filter @evlog/cli lint— passtsc --noEmitonpackages/cli— clean for touched files (fixture errors are pre-existing and unrelated)pnpm --filter @evlog/cli exec vitest run— 456 passedpnpm --filter evlog-telemetry lint,typecheck— passpnpm --filter evlog-telemetry exec vitest run— 190 passed, includingallowed-tools.test.ts