You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(observability): record what a zero on cache_* means — "no configured consumer", not "no cache activity" (#10023)
* docs(observability): record what a zero on `cache_*` means — "no configured consumer", not "no cache activity" (#9954)
`SEMCONV` declares the `cache_*` families as a stable namespace so hosts can
wire alerts/dashboards against it. In a default install those dashboards read a
flat zero, and neither the declaration nor the operator docs said why — leaving
"0% hit rate" and "the adapter is broken" as the available readings. Both wrong.
Nothing about emission changes: #9832 wired the adapter to the host's registry
and #9951 pins a real lookup observing cache_lookups_total{result=miss}. The
zero is TRUE; what it failed to communicate is its cause.
Cause re-measured on origin/main rather than taken from the card: no consumer of
the `cache` service is unconditional. Every production consumer is a rate-limit
or budget counter store gated on an explicit declaration — better-auth's per-IP
counters (rate_limit_max / rate_limit_window_seconds), the dispatcher's inbound
limiter and its declarative per-endpoint buckets (both register nothing at all
with no budget declared), and the per-number OTP send budget.
The annotation states that invariant rather than a roster, so it stays true when
another conditional consumer lands and goes false exactly when an unconditional
one appears — which is when it should be revisited. Worded deliberately against
the HTTP note beside it: there zero means "not instrumented"; here zero is a
true count of a service nothing consulted.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019bmVFqoQPq63zhKrxdYG1r
* fix(observability): attach the `cache_*` zero-meaning note as per-family JSDoc, so it reaches the shipped `.d.ts`
Measured, not assumed: `tsup`'s dts generation drops `//` line comments, so the
first draft's group-header note was absent from dist/index.d.ts — invisible to
the operator IDE hover that is the whole point of annotating a declaration an
operator panels against. The HTTP families #10004 annotated use per-family
JSDoc precisely because that form survives; this now matches that shape.
Verified in the built artifact: 2 occurrences of the phrase in
packages/observability/dist/index.d.ts after `pnpm --filter
@objectstack/observability build`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019bmVFqoQPq63zhKrxdYG1r
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments