test(core): raise wire-mesh-transport.ts mutation score to 78.70% - #101
Merged
Merged
Conversation
… connect_request lifecycle Adds direct WireMeshTransport tests (two real transports joined over genuine TLS sessions, matching presence-readvertise.integration.test.ts's own pattern) for surface the existing suite never exercised: - DOMAIN and FRAME_SCOPE's literal wire values, and buildCommand's shape - the presence-readvertise interval is only started when a presence source is configured, computes the documented 20-second default cadence, and is unref'd - isCoordinator and hasCoordinatorConnection reflect real state transitions, including watchForDisconnect firing for a coordinator session torn down from the other side - a connect_request's pending entry is cleared, with no spurious onPeerDisconnected, when the requester disconnects before a human decides - acceptConnection/rejectConnection each remove their own pending entry exactly once, and a rejection's message survives even when empty (proving the ?? fallback, not ||, is what's used) - connectToPeer's device-id mismatch refusal and wrapped dial-failure error, plus a full bidirectional message round trip once connected - shutdown rejects every pending connect_request with shutting_down, clears the presence interval, and closes already-accepted sessions - acceptConnection propagates the accepting listener's own policy onto the resulting handle
… message Adds: - readvertisePresence's own status===undefined early return actually skips sending, not merely that the interval never fires at all - send() to an untracked handle and sendRoomRequest() to an untracked member are silent/not_connected no-ops rather than throwing - a connect_request left unanswered past pendingConnectionTimeoutMs auto-rejects with the documented "no human decision within the pending-connection timeout" message, asserted directly against the dialing side's own rejected promise rather than through a layer that swallows it Two additional tests (a gossip send failing against a torn-down session, and send() failing the same way) were attempted directly against two real transports but proved inherently flaky: watchForDisconnect's own cleanup reliably wins the race against a still-tracked-but-broken session before a send against it can be observed failing, so removed rather than landing a nondeterministic test.
Mearman
force-pushed
the
fix/mutation-wire-mesh-transport-coverage
branch
from
September 14, 2026 08:06
f56a217 to
07680dd
Compare
Mearman
marked this pull request as ready for review
September 14, 2026 08:15
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Sep 14, 2026
Closed
|
🎉 This PR is included in version 2.21.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
2 tasks
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.
Summary
Raises
wire-mesh-transport.ts's Stryker mutation score from 69.91% (95 killed, 56 timeout, 65 survived, out of 216 covered mutants) to 78.70% (97 killed, 73 timeout, 46 survived, out of 216 covered mutants) -- confirmed via a full local Stryker run against this branch's final commit, not estimated.Just short of the repo's configured
thresholds.high: 80. The remaining 46 survivors are real, traceable gaps rather than equivalent mutants, but closing them needs its own dedicated follow-up pass -- tracked as a new sub-issue of agent-comms#64 rather than blocking this real, substantial improvement (69.91% -> 78.70%) on reaching the exact round number under this session's own heavy shared-machine load.New tests added closing genuine gaps found by tracing survivors against the real call graph:
WireMeshTransport's module constants and presence-readvertise interval.connect_requestlifecycle coverage.A parallel PR (#100, merged) did
identity.ts's own slice of the same issue.Test plan
pnpm typecheck && pnpm lint && pnpm testgreen--mutate "src/core/wire-mesh-transport.ts") confirms 78.70%