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:
@@ -1,25 +0,0 @@
|
||||
/**
|
||||
* Keyless-self-skipping smoke: ship one real session's records to a live
|
||||
* OTLP collector named by $DSH_OTLP_E2E_ENDPOINT and require the SDK's
|
||||
* shutdown (flush-and-quiesce) to resolve. Skipped without the endpoint so
|
||||
* secretless CI stays green — a CI accommodation, not a cost signal.
|
||||
*/
|
||||
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { Context } from 'cordis'
|
||||
import SessionStore, { SessionId } from '@deepseek-ai/dsh-session'
|
||||
import TelemetryOtel from '../src/index.ts'
|
||||
|
||||
describe.skipIf(!process.env.DSH_OTLP_E2E_ENDPOINT)('telemetry-otel e2e (live collector)', () => {
|
||||
it('exports a session and quiesces cleanly', async () => {
|
||||
const ctx = new Context()
|
||||
await ctx.plugin(SessionStore)
|
||||
const fiber = await ctx.plugin(TelemetryOtel, {
|
||||
exporter: { url: process.env.DSH_OTLP_E2E_ENDPOINT! },
|
||||
})
|
||||
const session = ctx.sessions.create(SessionId(`e2e-${Date.now()}`), { meta: {} })
|
||||
session.append('turn/start', { turn: 1, trigger: { kind: 'message', source: { kind: 'user' } } })
|
||||
session.append('turn/end', { turn: 1, reason: { kind: 'completed' } })
|
||||
await expect(fiber.dispose()).resolves.not.toThrow()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user