test(msteams): delivery trace goldens for native append streaming#104573
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 11, 2026, 1:12 PM ET / 17:12 UTC. Summary PR surface: Source +43, Tests +328. Total +371 across 5 files. Reproducibility: not applicable. This PR adds deterministic coverage for established Microsoft Teams delivery behavior rather than reporting a user-facing defect. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land the focused trace suite after normal protected-label review, preserving its role as a current-behavior oracle rather than changing the surfaced streaming quirks in this PR. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds deterministic coverage for established Microsoft Teams delivery behavior rather than reporting a user-facing defect. Is this the best way to solve the issue? Yes: extending the shared harness through the real Microsoft Teams dispatcher and stream controller is the narrowest maintainable way to lock current behavior without changing runtime policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 58ef98ec1311. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +43, Tests +328. Total +371 across 5 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Merged via squash.
|
Related: #104318
What Problem This Solves
Extends the delivery trace harness (#104478) to MSTeams — the append-sink native-streaming channel whose deliver-callback semantics (cumulative→delta conversion, write-error cancellation, intentional duplicate redelivery) are the second-hardest case the planned core delivery engines must reproduce.
Why This Change Was Made
Four golden scenarios drive the real dispatcher + stream controller with mocked Bot Framework surfaces under fake timers: DM native streaming with in-place AI-label chrome; channel block-fallback; cancellation via StreamCancelledError (terminal, everything suppressed); mid-stream failure with the intentional duplicate-full-block redelivery. The goldens pin five current behaviors as explicit Phase-4 oracles, including three newly surfaced by tracing: post-failure partials compute a garbled cross-block delta against a stale baseline; finals are not deduped against already-streamed block text (unlike mattermost); a mid-reply block boundary latches finalization so the second block never streams. These are captured as-is — deciding their fate belongs to the engine design, not this PR.
User Impact
None at runtime — test infrastructure. Maintainers get replayable pinned behavior for MSTeams delivery.
Evidence
tbx_01kx91bja0es59f3tr1q4rs9qn: full msteams suite +pnpm check:changedgreen; trace re-verify 4/4 ontbx_01kx921skdamhr2feh1rmm005n(one lease died to infra mid-round and was retried). Goldens byte-stable across local + remote Linux verify runs.