diff options
| author | Adam Malczewski <[email protected]> | 2026-06-05 17:02:06 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-05 17:02:06 +0900 |
| commit | 64a66d5e41c5ab54a1d0a7712866be722b742d4b (patch) | |
| tree | 46743ba580a7d5f69d7f7e932826b2f479841a72 /packages/kernel/src | |
| parent | 4fd658f9612a960c6b185e53fa52c064406dad4f (diff) | |
| download | dispatch-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
