Skip to content

test(msteams): delivery trace goldens for native append streaming#104573

Merged
steipete merged 1 commit into
mainfrom
claude/chanref-p0-traces-msteams
Jul 11, 2026
Merged

test(msteams): delivery trace goldens for native append streaming#104573
steipete merged 1 commit into
mainfrom
claude/chanref-p0-traces-msteams

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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

  • Testbox tbx_01kx91bja0es59f3tr1q4rs9qn: full msteams suite + pnpm check:changed green; trace re-verify 4/4 on tbx_01kx921skdamhr2feh1rmm005n (one lease died to infra mid-round and was retried). Goldens byte-stable across local + remote Linux verify runs.
  • Autoreview (codex gpt-5.6-sol, xhigh): clean first pass (0.88).
  • No core edits; no mocks of openclaw code — real wiring via the channel's runtime seam.

@openclaw-barnacle openclaw-barnacle Bot added channel: msteams Channel integration: msteams size: M maintainer Maintainer-authored PR labels Jul 11, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 11, 2026
@clawsweeper

clawsweeper Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 11, 2026, 1:12 PM ET / 17:12 UTC.

Summary
Adds four Microsoft Teams delivery-trace goldens and a test driver covering native streaming, block fallback, cancellation, and stream-failure redelivery.

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
Relationship: fixed_by_candidate
Canonical: #104318
Summary: This PR supplies one Phase-0 behavior-lock slice for the canonical channel refactor program.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Next step before merge

  • [P1] No automated repair is needed; this protected maintainer-labeled PR should remain open for normal review and merge gating.

Security
Cleared: The diff is confined to tests and static goldens, with no new dependency, workflow, permission, secret, install, publishing, or production execution surface.

Review details

Best 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 changes

Label changes:

  • add P3: This test-only conformance-oracle extension has no runtime user impact and is low-risk maintainer infrastructure.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-labeled test-infrastructure PR is exempt from the external-contributor real-setup gate; its reported Testbox replay and changed checks are appropriate supplemental proof.

Label justifications:

  • P3: This test-only conformance-oracle extension has no runtime user impact and is low-risk maintainer infrastructure.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-labeled test-infrastructure PR is exempt from the external-contributor real-setup gate; its reported Testbox replay and changed checks are appropriate supplemental proof.
Evidence reviewed

PR surface:

Source +43, Tests +328. Total +371 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 4 43 0 +43
Tests 1 328 0 +328
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 371 0 +371

What I checked:

Likely related people:

  • steipete: Introduced the shared delivery-trace harness and has the dominant recent history across the Microsoft Teams dispatcher and stream-controller paths. (role: delivery-trace and recent Microsoft Teams stream contributor; confidence: high; commits: ba826be268a7, b2a6408964f5; files: src/channels/plugins/contracts/trace/delivery-trace.ts, extensions/msteams/src/reply-stream-controller.ts, extensions/msteams/src/reply-dispatcher.ts)
  • BradGroux: Contributed recent Microsoft Teams typing, block-streaming, duplicate-text, and error-handling behavior adjacent to the traced delivery paths. (role: Microsoft Teams area contributor; confidence: medium; commits: fce81fccd859, 03c64df39fe7, 57949397fa18; files: extensions/msteams/src/reply-stream-controller.ts, extensions/msteams/src/reply-dispatcher.ts, extensions/msteams/src/reply-stream-controller.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 702ba19 into main Jul 11, 2026
137 of 146 checks passed
@steipete
steipete deleted the claude/chanref-p0-traces-msteams branch July 11, 2026 17:18
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: msteams Channel integration: msteams maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant