Files
OmniRoute/tests
diegosouzapw 2d31fb71fd feat(video): redact transcript text from persisted logs and skip durable memory for observed requests
Task P1b of #12150 (Video Bridge transcript retention). Consumes P1a's
guardrail-side shadow (meta.videoBridgeObserved / meta.videoBridgeLogRedaction
on the video-bridge preCall result) and wires it to the two remaining P1
surfaces:

- Surface 1 (log sink): the redaction map is threaded from chat.ts (derived
  from preCallGuardrails.results via one additive optional param,
  videoBridgeLog, undefined on every non-video request) through
  executeChatWithBreaker -> handleChatCore -> persistAttemptLogs's context.
  attemptLogging.ts's new applyVideoBridgeLogRedaction() applies the map to a
  shallow-then-targeted CLONE of body right before it is serialized into the
  persisted call log, swapping each mapped part's text for the placeholder.
  The original body reference is never mutated -- the model already received
  the untouched text earlier in the request lifecycle.
- Surface 3 (Memory sink): chatCore.ts's inline
  "memoryOwnerId && memorySettings?.enabled && memorySettings.maxTokens > 0"
  gate is extracted to a pure, unit-tested shouldExtractMemory() in
  memoryExtraction.ts, adding one condition -- a video-bridge-observed
  request's request-derived text is a flattened transcript description, not
  user-authored conversation, so it is never persisted as a durable memory
  fact. Only the request-derived extractFacts() call is gated at both the
  non-streaming and streaming sites; the response-derived call (the model's
  own reply) is untouched, per the design doc's scoping.

src/sse/handlers/chatDispatch.ts needed no change: its DispatchArgs type
already has an index signature and forwards its whole args object into
executeChatWithBreaker via a spread, so the new field flows through
unmodified.

Refs #12150
2026-09-02 01:25:14 -03:00
..
2026-08-26 14:25:01 -03:00