Remove dead overlay Encoder impl and Connection::split chain - #3916
Remove dead overlay Encoder impl and Connection::split chain#3916tomerweller wants to merge 2 commits into
Conversation
The tokio `Encoder<AuthenticatedMessage>` impl on `MessageCodec` and the `Connection::split()` / `ConnectionSender` / `ConnectionReceiver` sink-receiver chain were unreachable in production. The real send path is `Connection::send` -> `MessageCodec::encode_message` and the real receive path is `Decoder::decode`; neither goes through the `Sink`/`Encoder` machinery, and `split()` had zero callers (the split halves were never re-exported from lib.rs). Delete the whole chain plus the now-unused `Encoder`, `BufMut`, and `SinkExt` imports, and rewrite the two codec tests that used `codec.encode(...)` to source byte-identical wire frames from `encode_message`. No observable-surface impact: `encode_message` emitted the same `len | 0x80000000` prefix + XDR body, so no overlay wire bytes change. Refs #3784 Co-authored-by: Claude Code <claude-code@anthropic.com>
🔍 Reviewer: CorrectnessVerdict: APPROVE Summary: Clean, self-contained dead-code removal exactly matching issue #3784. Removed symbols have zero callers; the three in-crate round-trip tests were correctly rewritten to the real send path, and CI Test/Clippy/Build are green. Full reviewCycle 1 (no prior Correctness verdict on this PR) — complete change-list review.
No concerns. |
🔍 Reviewer: ParityVerdict: APPROVE Summary: No observable/interop-surface impact. The removed Full reviewCycle 1 — parity lens per docs/PARITY.md (observable surface only: SCP/overlay wire bytes, hashes, tx result/meta XDR, history format, HTTP/RPC/CLI, crypto).
No observable-surface concerns. |
Review: Bounce-Back Cycle 1Reason: CI failed (unrelated, will rebase) Reviewer A: APPROVE — clean dead-code removal; removed symbols have zero callers; round-trip tests rewritten to The only non-green check is Both reviewer lenses APPROVE. Per the |
Do: Mode B — CI re-triggeredBoth reviewer lenses already APPROVE (Correctness + Parity); the only bounce reason was an unrelated CANCELLED/timed-out
Ready for re-review once the testnet job completes. |
🔍 Reviewer: CorrectnessVerdict: APPROVE Summary: Cycle 2, code unchanged since cycle 1 (head still Full reviewCycle N≥2 — prior Correctness verdict was APPROVE. Prior concern classes: none. Re-verifying, no new class discovered.
No concerns. |
🔍 Reviewer: ParityVerdict: APPROVE Summary: Cycle 2, code unchanged. No observable/interop-surface impact: the removed Full reviewCycle N≥2 — prior Parity verdict was APPROVE. Prior concern classes: none. Re-verifying, no new class discovered. Parity lens per
No observable-surface concerns. |
Review: Bounce-Back Cycle 2Reason: CI failed (unrelated, will rebase) Reviewer A: APPROVE — clean dead-code removal; re-verified zero external callers and preserved round-trip test coverage on the real The only non-green check is Action for Routing back to |
Both reviewer lenses (Correctness + Parity) approved this PR unchanged across two cycles; the only non-green check was a recurring CANCELLED `test (testnet, ...)` quickstart job from external testnet flakiness, not attributable to this 2-file dead-overlay-code removal. The branch already sits on the current origin/main tip (5ac2f16), so a rebase is a no-op; this empty commit exists solely to trigger a brand-new CI run so the testnet probe re-runs fresh, per the /review-pr cycle-2 bounce. Refs #3784 Co-authored-by: Claude Code <claude-code@anthropic.com>
Do: Mode B — Cycle 2 fresh CI pushBoth reviewer lenses (Correctness + Parity) APPROVE and have across both prior cycles; there are no inline review comments to address. The sole blocker is the recurring CANCELLED Cycle 1's bounce only re-ran the stale run's jobs (no new commit → same run). This cycle:
Diff is unchanged from the twice-approved |
🔍 Reviewer: CorrectnessVerdict: APPROVE Summary: Clean dead-code removal. The removed Full reviewCycle 1 (no prior Correctness verdict on this PR) — complete class-labeled change-list. No blocking concerns found. Verified:
No new class discovered. |
🔍 Reviewer: ParityVerdict: APPROVE Summary: No change to the observable/interop surface. The removed Full reviewCycle 1 (no prior Parity verdict on this PR) — complete class-labeled change-list. No blocking parity concerns. Observable-surface analysis (per
Internal-only aspects (explicitly allowed, not flagged): removal of No new class discovered. |
Do: Mode B — Cycle 3 CI re-trigger (environmental testnet flake)Both reviewer lenses (Correctness + Parity) APPROVE across all three cycles, and there are no inline review comments to address. The sole blocker remains the This cycle's failure is environmental, not the diff:
Action: PR head ( Ready for re-review. |
tomerweller
left a comment
There was a problem hiding this comment.
Environmental testnet-probe flake re-triggered; code unchanged and twice-approved by both lenses. Ready for re-review.
🔍 Reviewer: CorrectnessVerdict: APPROVE Summary: Clean, self-contained dead-code removal matching issue #3784. The removed Full reviewCycle N (code unchanged since the twice-approved head; current head is the empty re-trigger commit Independently re-verified against the PR head:
No blocking concerns. |
🔍 Reviewer: ParityVerdict: APPROVE Summary: No observable/interop-surface impact. The removed Full reviewCycle N — parity lens per
No blocking parity concerns. |
Review: Bounce-Back Cycle 2Reason: CI failed (unrelated, will rebase) Reviewer A: APPROVE — clean dead-code removal; re-verified zero external callers of the removed The only non-green check is This is the same environmental testnet-probe cancellation that produced the two prior unrelated-red cycles; the empty re-trigger commit |
Closes #3784
Summary
Removes the production-dead overlay encode/split abstraction: the tokio
Encoder<AuthenticatedMessage>impl onMessageCodec(codec.rs) and theConnection::split()/ConnectionSender/ConnectionReceiversink-receiver chain (connection.rs). The real send path isConnection::send->MessageCodec::encode_messageand the real receive path isDecoder::decode; neither uses theSink/Encodermachinery, andsplit()had zero callers (the halves were never re-exported fromlib.rs). Also drops the now-unusedEncoder,BufMut, andSinkExtimports and refreshes the stalecheck_encode_size/MessageCodecdoc comments.Plan reference
Converged Plan comment (round-1, A/B/C all APPROVE)
Test plan
cargo fmt --checkcargo clippy -p henyey-overlay --all-targets(global-Dwarnings) cleancargo test -p henyey-overlaypassescargo build --allpasses (confirms no external caller of the removed symbols)The two
#[cfg(test)]tests that calledcodec.encode(...)(test_codec_roundtrip_with_record_marking_bit,test_codec_streaming) were preserved by rewriting them to source byte-identical wire frames fromMessageCodec::encode_message; theiris_last_fragment/ streaming assertions are unchanged and still pass.Deviations from plan
None.
🤖 Generated with Claude Code