summaryrefslogtreecommitdiffhomepage
path: root/packages/kernel/src
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-05 17:02:06 +0900
committerAdam Malczewski <[email protected]>2026-06-05 17:02:06 +0900
commit64a66d5e41c5ab54a1d0a7712866be722b742d4b (patch)
tree46743ba580a7d5f69d7f7e932826b2f479841a72 /packages/kernel/src
parent4fd658f9612a960c6b185e53fa52c064406dad4f (diff)
downloaddispatch-64a66d5e41c5ab54a1d0a7712866be722b742d4b.tar.gz
dispatch-64a66d5e41c5ab54a1d0a7712866be722b742d4b.zip
feat(observability): provider record/replay via @dispatch/trace-replay — env-gated capture + hermetic fixture tests (331 tests)
provider-openai-compat now consumes @dispatch/trace-replay. (A) Opt-in record mode: when DISPATCH_RECORD_FIXTURE is set, the fetch edge wraps recordFetch and saves a fixture of the verbatim post-transform request + raw SSE response, self-redacting the auth header in the provider's OWN code (reuses its existing maskSecret graduated-tier mask — no shared helper, isolation over DRY). Zero overhead when unset; fail-safe. (B) Hermetic replay tests: stream.test.ts drives the provider off committed SSE fixtures via replayFetch (chunk-split to exercise SSE parsing across boundaries), asserting ProviderEvents + that the outgoing request still matches the recorded one (transform-drift regression). Injectable fetch via an internal StreamConfig.fetchFn — NO kernel contract change. 2 committed fixtures (text-turn + tool-call, currently hand-authored-faithful; a real flash text-turn swap follows). Verified: tsc -b clean, 331 vitest (327 -> +4: 2 replay + 2 redaction), biome 0/0. Provider 44 -> 48.
Diffstat (limited to 'packages/kernel/src')
0 files changed, 0 insertions, 0 deletions