# Observability, testing and qualification

Follow behavior across boundaries and distinguish declared support from evidence that a selected composition works.

Source snapshot: bcc79fcc27c4d801c2119bef81ddcce7b4e86498

## Choose the boundary to observe

The observability package provides OpenTelemetry-oriented primitives with vendor-neutral signal and error-reporting ports. Its canonical signal/evidence declarations validate supplied observations; emission, persistence and backend selection belong to the instrumentation facade and host. Start with one operation and the question you need to answer: latency, failure cause, denied authority, queue delay or provider outcome. Emit identifiers and safe evidence references that let an operator correlate those events without copying the full business payload.

Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/observability/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/testing/README.md

## Preserve context and privacy

The source documents W3C trace carrier helpers across HTTP, queues, jobs, webhooks and MCP. It also describes default privacy filtering and bounded dispatch that isolates exporter outages from business work. Inspect the exact carrier boundary and its validation rather than manually concatenating trace headers. Keep operational trace state distinct from durable domain evidence: a missing telemetry event should not be interpreted as proof that a business effect did or did not happen.

Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/observability/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/testing/README.md

## Match the test to the claim

Testing utilities include contract-aware runners, recording and generation surfaces; conformance and agent-evaluation packages provide other targeted checks. Select a check that can falsify the behavior being documented. Static source inspection can show a declared operation; a handler fixture can demonstrate a local result; a transport test can qualify encoding and context; a clean package consumer can reveal distribution problems. Provider-backed and deployed evidence require their own environment and should not be inferred from those earlier checks.

Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/observability/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/testing/README.md

## Trace a successful and denied request

Follow correlation from the caller through the adapter, handler and any queued/provider work. Compare a valid request with a policy or validation denial and inspect which safe identifiers remain available for diagnosis.

Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/observability/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/testing/README.md

## Choose one concrete regression

Use the owning package’s existing fixture or test surface for the failure you are addressing: replay, wrong scope, schema mismatch, provider timeout or translation/context drift. Avoid a check that merely restates the implementation.

Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/observability/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/testing/README.md

## Record what the result establishes

Attach the source revision, package/environment context, command or test identity and observed outcome. Keep unexecuted source examples and source-present APIs labeled accordingly, so a later release or product page can make a defensible availability claim.

Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/observability/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/testing/README.md

## Packages

- [@lssm-tech/lib.agent-evals](https://lssm.co/docs/packages/lib.agent-evals/): Agent evaluation runners, adapters, graders, and recommendation evidence.
- [@lssm-tech/lib.logger](https://lssm.co/docs/packages/lib.logger/): Comprehensive logging library optimized for Bun with ElysiaJS integration
- [@lssm-tech/lib.observability-spec](https://lssm.co/docs/packages/lib.observability-spec/): Pure signal declarations, cost evidence models and deterministic validation shared by observability and billing.
- [@lssm-tech/lib.observability](https://lssm.co/docs/packages/lib.observability/): OpenTelemetry-based observability primitives
- [@lssm-tech/lib.testing](https://lssm.co/docs/packages/lib.testing/): Contract-aware testing utilities and runners
- [@lssm-tech/lib.agent-runtime-conformance](https://lssm.co/docs/packages/lib.agent-runtime-conformance/): Cross-runtime lifecycle conformance suite for ContractSpec agent runtime adapters
- [@lssm-tech/tool.test-redaction-rules](https://lssm.co/docs/packages/tool.test-redaction-rules/): Credential-pattern regex corpus for CI telemetry redaction sweeps (T.3).
- [@lssm-tech/lib.testing-helpers](https://lssm.co/docs/packages/lib.testing-helpers/): Shared test infrastructure helpers for Phase 1 / Phase 3 cockpit-kit extraction
