refactor(telemetry): drop dead live-collector smoke and the compact/end severity probe
tests/otel.e2e.ts self-skipped on $DSH_OTLP_E2E_ENDPOINT, which nothing in the repo sets — it never ran; the mock-collector wire spec and the keyless Loader-composition e2e already cover the pipeline both ways. The severityOf compact/end probe parsed another package's merged event shape by string comparison — an untyped cross-package contract that breaks silently — and its only consumer was the test's own stand-in declaration. Unknown event types now uniformly fall through as info; outcome semantics stay with the owning package.
This commit is contained in:
@@ -218,15 +218,11 @@ function severityOf(event: SessionEvent): TelemetrySeverity {
|
||||
return event.data.reason.kind === 'error' ? 'error' : 'info'
|
||||
case 'prompt/blocked':
|
||||
return 'warn'
|
||||
default: {
|
||||
// Merge-extensible fall-through (no assertNever): types this seam does
|
||||
// not depend on still get their RFC-pinned severity via a widened
|
||||
// probe — `compact/end` is declared by dsh-compact, which the seam
|
||||
// deliberately does not import.
|
||||
const type: string = event.type
|
||||
if (type === 'compact/end' && (event.data as { error?: unknown }).error !== undefined) return 'error'
|
||||
default:
|
||||
// Merge-extensible fall-through (no assertNever): event types this seam
|
||||
// does not depend on — including plugin-merged ones it never heard of —
|
||||
// pass through as info; their owners' outcome semantics stay theirs.
|
||||
return 'info'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user