Repository navigation
chore(ai): reduce duplicate Anthropic stream tests - #132462
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 29, 2026, 6:10 PM ET / 22:10 UTC. ClawSweeper reviewWhat this changesThe branch first removed and then restored three direct Anthropic provider stream regression tests, leaving no net change. Merge readinessNo blocking findings: the current head introduces no diff and restores the direct-provider regressions raised in the prior review. Because this is a member-authored PR with the protected Priority: P3 Review scores
Verification
How this fits togetherAnthropic provider streaming processes SDK response events into OpenClaw stream output, while the managed transport has a separate stream parser. Their tests cover similar server events at different ownership boundaries. flowchart LR
A[Anthropic SDK response] --> B[Provider stream parser]
C[Managed transport response] --> D[Transport stream parser]
B --> E[OpenClaw stream output]
D --> E
E --> F[Regression tests]
Decision needed
Why: The final branch has no merge-base-to-head contribution, but the author association and protected maintainer label prohibit automated closure. Before merge
Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep the restored direct-provider regression coverage and close the no-op PR only if its member owner agrees that no narrower cleanup remains. Do we have a high-confidence way to reproduce the issue? Not applicable: the current merge-base-to-head delta is empty, so this head introduces no behavior to reproduce. Is this the best way to solve the issue? Yes: restoring the direct-provider tests is the best outcome because the SDK-event parser and managed-transport parser remain independently implemented and tested. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 10da9ac92194. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Addressed the latest ClawSweeper rank-up moves at
The PR now has no net diff. It should not be merged as cleanup; leaving it open for maintainer disposition without manufacturing unrelated changes. |
* test(ai): remove duplicate Anthropic stream regressions * test(ai): retain direct Anthropic stream regressions
What Problem This Solves
Removes redundant Anthropic stream regressions that made the provider test suite repeat coverage already owned by the canonical transport stream suite.
Why This Change Was Made
The provider suite duplicated three transport-owned cases: mid-stream Fable fallback reconstruction, interleaved content-block routing, and start-event ordering after
message_start. The matching cases remain inpackages/ai/src/transports/anthropic-transport-stream.test.ts, where the behavior is implemented and exercised through the guarded transport boundary.Root cause: provider-level regression coverage was added alongside equivalent lower-level transport coverage and survived later fixture deduplication. This change consolidates proof at the canonical owner without changing runtime code, fixtures, or behavior.
Production LOC: +0/-0 (net 0) | Tests: +0/-208
User Impact
No user-visible behavior changes. Contributors get a smaller, less repetitive Anthropic test suite while retaining the same owner-boundary regression coverage.
Evidence
node scripts/run-vitest.mjs packages/ai/src/providers/anthropic.test.ts packages/ai/src/transports/anthropic-transport-stream.test.ts— 2 files passed, 224 tests passed.packages/ai/src/transports/anthropic-transport-stream.test.ts.git diff --check— passed.packages/ai/src/providers/anthropic.test.ts— passed.node scripts/check-changed.mjs -- packages/ai/src/providers/anthropic.test.ts— all gates before core-test typecheck passed; typecheck stopped on the checkout's existing missingpakodeclaration (ui/vite.config.ts:9, TS7016), unrelated to this test-only deletion.