Repository navigation
test(ai-opencode): let durability-attach runs settle so coverage is stable - #1596
Conversation
…oning them The two pass-the-gate tests abandoned the stream after the spawn. The run then kept talking to 127.0.0.1:4096 until the file ended, so coverage of the post-spawn path changed per machine. That made the Coverage gate fail unrelated PRs with the same -1.18pp ai-opencode drop. Point the mock port channel at 127.0.0.1:1, which refuses at once, and drain every stream to its RUN_ERROR end.
|
View your CI Pipeline Execution ↗ for commit a640570
☁️ Nx Cloud last updated this comment at |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: TanStack/ai/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe durability attachment tests now use port 1 and collect streams with a three-second bound. The fresh-durable and no-durability tests assert that the stream yields an error. Existing warning and spawn assertions remain. ChangesDurability attachment tests
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to The tests now check that the runs reach their expected error. No actionable merge-blocking regression is established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@tanstack/ai
@tanstack/ai-acp
@tanstack/ai-angular
@tanstack/ai-anthropic
@tanstack/ai-bedrock
@tanstack/ai-byteplus
@tanstack/ai-claude-code
@tanstack/ai-client
@tanstack/ai-cloudflare
@tanstack/ai-code-mode
@tanstack/ai-code-mode-snippets
@tanstack/ai-codex
@tanstack/ai-cohere
@tanstack/ai-compaction
@tanstack/ai-devtools-core
@tanstack/ai-durable-stream
@tanstack/ai-elevenlabs
@tanstack/ai-event-client
@tanstack/ai-fal
@tanstack/ai-gemini
@tanstack/ai-grok
@tanstack/ai-grok-build
@tanstack/ai-groq
@tanstack/ai-isolate-cloudflare
@tanstack/ai-isolate-daytona
@tanstack/ai-isolate-node
@tanstack/ai-isolate-quickjs
@tanstack/ai-isolate-quickjs-bun
@tanstack/ai-llmgateway
@tanstack/ai-lovable
@tanstack/ai-mcp
@tanstack/ai-memory
@tanstack/ai-mistral
@tanstack/ai-octane
@tanstack/ai-ollama
@tanstack/ai-ollaya
@tanstack/ai-openai
@tanstack/ai-opencode
@tanstack/ai-openrouter
@tanstack/ai-perplexity
@tanstack/ai-persistence
@tanstack/ai-preact
@tanstack/ai-react
@tanstack/ai-react-ui
@tanstack/ai-reactor
@tanstack/ai-remix
@tanstack/ai-sandbox
@tanstack/ai-sandbox-blaxel
@tanstack/ai-sandbox-boxd
@tanstack/ai-sandbox-cloudflare
@tanstack/ai-sandbox-daytona
@tanstack/ai-sandbox-docker
@tanstack/ai-sandbox-e2b
@tanstack/ai-sandbox-local-process
@tanstack/ai-sandbox-sprites
@tanstack/ai-sandbox-upstash-box
@tanstack/ai-sandbox-vercel
@tanstack/ai-skills
@tanstack/ai-solid
@tanstack/ai-solid-ui
@tanstack/ai-svelte
@tanstack/ai-typesafe
@tanstack/ai-utils
@tanstack/ai-vercel-gateway
@tanstack/ai-vertex
@tanstack/ai-vue
@tanstack/ai-vue-ui
@tanstack/ai-worldlabs
@tanstack/openai-base
@tanstack/preact-ai-devtools
@tanstack/react-ai-devtools
@tanstack/solid-ai-devtools
@tanstack/svelte-ai-devtools
commit: |
The Coverage check no longer fails unrelated PRs on
ai-opencode. Two tests indurability-attach.test.tsabandoned their adapter stream after the harness spawn. The abandoned run kept going against127.0.0.1:4096until the test file ended, soai-opencodecoverage changed from machine to machine. Every run in this file now settles before its test ends.🎯 Changes
http://127.0.0.1:1. Port 1 refuses at once, so a run that passes the durability gate fails its first HTTP call and ends withRUN_ERROR.collectWithin, in place ofstartUntilSpawn. They also assert theRUN_ERROR, which proves the stream settled.startUntilSpawnand its fire-and-abandon logic are deleted.Test-only change. No changeset, because no published code changed. No docs change.
✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.docs/for this change, or this change is not user-facing.pnpm changeset), or this PR does not change a published package.🚀 Release Impact
Testing
Commands run.
vitest run tests/durability-attach.test.tsinpackages/ai-opencode: 3 passed. The tests take 8 ms in total, so each stream settles at once.tscandoxlintinpackages/ai-opencode: no errors.pnpm test:pr.Manual test.
ai-opencoderow in the summary.ai-opencodenumbers both times.How this PR makes testing easy. The changed test file is the test. The new
RUN_ERRORassertion fails if a run past the gate stops settling.Linked issues
Evidence of the flake: these unrelated PRs failed Coverage with the same
ai-opencode 65.15% (-1.18)row:chore/start-example-dependencies(run 36906102617)fix/after-model-interrupt-thinking(run 36844270881)Risk / rollback
ai-opencodedrop. Its base is main's cached result from the old, timing-dependent run. If that happens, merge past the Coverage check. After this lands,mainholds the stable number.Summary by CodeRabbit