test: stabilize resource subscription handshake observation - #276
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe upstream runtime now supports configurable subscription-start delays. The handshake test uses that delay and deterministic marker observation to verify invalidated subscriptions are not retained. The bundled upstream fixture was regenerated with minified output changes. ChangesSubscription handshake synchronization
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
Relates to #124.
The fresh aggregate-only recurrence was an observation failure: this test used Vitest's default one-second
expect.polldeadline to wait for the child fixture's synchronous subscribe-entry marker. When the child reached that marker after the deadline, cleanup closed a still-pending client request and produced the secondary connection-close rejection.This PR:
The original restart-specific timeout in #124 has not been independently reproduced by this correction, so this PR intentionally does not close the issue.
Validation
Matcher did not succeed in timeand the expected cleanup-side connection-close rejection.npx vitest run tests/mcp-wrapper.test.ts -t "does not retain a subscription invalidated during its upstream handshake"npx vitest run tests/mcp-wrapper.test.ts— 97 passednpx vitest run --coverage tests/mcp-wrapper.test.ts— 97 tests passed; command then reports unchanged repository-wide coverage thresholds because it is a focused runnpx vitest run tests/package-contract.test.ts— 24 passednpm run lintnpm run typechecktests/fixtures/fake-upstream-bundled.mjstwice with identical SHA-256Summary by CodeRabbit
Tests
Maintenance