Skip to content

fix(connect): preserve tunnel delivery and late wrappers - #142

Merged
minekube-ai-engineer[bot] merged 2 commits into
mainfrom
fix/tunnel-compatibility-regressions
Aug 9, 2026
Merged

fix(connect): preserve tunnel delivery and late wrappers#142
minekube-ai-engineer[bot] merged 2 commits into
mainfrom
fix/tunnel-compatibility-regressions

Conversation

@minekube-ai-engineer

@minekube-ai-engineer minekube-ai-engineer Bot commented Aug 9, 2026

Copy link
Copy Markdown

Summary

  • flush each accepted tunnel packet atomically inside one FIFO event-loop task
  • resolve Velocity's current frontend initializer for every tunnel instead of retaining the startup snapshot
  • preserve the Connect tunnel chat-session filter after third-party wrappers initialize the channel

Reproduction: delayed keepalive delivery (#140)

The new TunnelHandlerTest.onReceiveFlushesBeforeTheNextEventLoopTaskCanObserveDelivery inserts an observation task immediately after packet acceptance. The previous two-task batching path produced [WRITE, OBSERVE, FLUSH], proving unrelated event-loop work could run before the accepted packet was delivered. The fixed path produces [WRITE, FLUSH, OBSERVE] and keeps payload copying and event-loop confinement.

The later Windows socket abort in the report is cleanup after Paper's kick, not the initiating cause. An affected-host 0.15.4 retest is still required before closing #140.

Reproduction: PacketEvents/nLogin (#141)

The Velocity regression test installs a PacketEvents-shaped wrapper after Connect creates its tunnel initializer. The previous implementation invoked only the captured Velocity initializer and omitted the later decoder. The fixed path resolves the holder per connection, so both the base Velocity decoder and late PacketEvents decoder are present.

Validation

  • focused RED: delayed-flush test returned [WRITE, OBSERVE, FLUSH]
  • focused GREEN: complete TunnelHandlerTest passed
  • focused Velocity late-binding test passed
  • full ./gradlew check passed

Closes #141
Addresses #140

@minekube-ai-engineer minekube-ai-engineer Bot changed the title fix(velocity): honor late channel initializer wrappers fix(connect): preserve tunnel delivery and late wrappers Aug 9, 2026
@minekube-ai-engineer
minekube-ai-engineer Bot merged commit b539e53 into main Aug 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connect Velocity local tunnel channels are incompatible with PacketEvents/nLogin pipeline injection

0 participants