Repository navigation
test: make HTTP lifecycle qualification independent of provider speed - #23
Merged
Merged
Conversation
… connection in upstream handler
ThorFuchs
marked this pull request as ready for review
November 23, 2026 08:14
This was referenced Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The stalled-writer test assumes a finite provider must still be running when its output times out. Core event emission acknowledges bounded queue admission, so a provider may already have returned while its request still owns the drain. The old
cancelledcounter also counts every error caught in the emission loop; it does not identify Swift task cancellation specifically. This makes the release assertion depend on scheduling and throughput.Change
This candidate includes PR #20's existing connection-admission change, and replaces the ambiguous lifecycle expectation with complementary contracts:
CancellationError.The frame count, payload size and I/O deadline remain unchanged. The runbook/runner pins the exact HTTP commit, checks clean fresh checkouts and lock identity, verifies actual nonempty test execution, and archives partial logs. Referee builds now honor the two-job setting. Release fixture tests receive the exact optimized server path through
MCP_REFEREE_FIXTURE, with an executable check. The fixture now checks its actual two-component started/joined report, and the subprocess test requires one cancellation notification before one graceful completion, consistent with the frozen subscription-teardown rules. The lifecycle document separately identifies the response-head/static-output deadline coverage gap.Validation
Tested head:
7ed6fc14ff86ee69064e2249c836c931df86e1c5, tree3c9b8c6be010fac09692460f8f85408e60c5690d. CI's synthetic merge commite0b014d448cce063416e823a4234bec4a8355171has the same tree. This PR was merged on 2026-11-23 as7287b61910e713b5790f57e111e8d9273f46996c; that commit is the currentmainat review time and has exactly the same tree.timeout=1 returned=1 cancelled=0 admitted=32 received=660404; deliberately live provider:timeout=1 returned=0 cancelled=1 admitted=32 received=660404. Both pass resource cleanup before client reading/listener shutdown and successful same-listener recovery. Debug also passes, with actual cancellation in both native cases. This independently confirms both intended lifecycle contracts on the Studio; it does not establish timestamp ordering for the original failing run. Reviewed archive:studio-focused-7ed6fc14ff86-20261123T081545Z-1Rb26E.tar.gz, SHA-256b5be35f5a8031acd41146d20faa1d326e2e3a04e6b201154547805250d27be9c. The separate Studio full run is still in progress.FIXTURE_STOPPED started=2 joined=2 active=0.MCP_REFEREE_FIXTUREenvironment. Tracing that previously unreached subprocess path also identified the stale single-component receipt and the outdated negative subscription-cancellation assertion; these are corrected in the current head.CancellationError. That instrumented run did not reproduce the normal-return case. The final full Release run now does: the finite native case reportstimeout=1 returned=1 cancelled=0 admitted=32 received=660404, while the deliberately live provider reportstimeout=1 returned=0 cancelled=1 admitted=32 received=660404. Both pass cleanup and recovery. This is a native observation of the intended alternative lifecycle, not a retrospective reconstruction or precise return/timeout timestamp ordering for the original Studio execution.Scope and remaining blockers
This PR builds on PR #20; it does not include PR #21's dependency upgrade. The separate PR20 + HTTP-server 0.5.0 link probe removed the Connection link error but retained the Reader metadata errors, independently reproduced without MCP. Symbol inspection shows private-external Reader metadata becomes local during Swift Build's intermediate object link. The native-backend comparison now passes the same combined server and all four Release probes. The full graph is byte-identical across the two backend runs (29 pins); the mini graph is separately byte-identical across its runs (24 pins). Both use
-Oand whole-module optimization. Native links the original object files, preserving the private-external definitions needed by the consumer. The selected toolchain marks the native backend deprecated, and this is link qualification only: no shipping backend/dependency switch is included.The existing Darwin early-EOF known issues (#12 / apple/swift-nio#3783), immutable Core release dependency (#14), and response-head/static-output deadline qualification remain separate. The required CI is reviewed and green with the explicitly retained known issues. This PR is now merged. The independent Studio focused comparison is also reviewed and green; the separate local Studio full qualification remains pending.
Refs #13, #20, #22.