Skip to content

build: bump lampshade to fix session desync that hung TestRoundTrip - #684

Open
reflog wants to merge 3 commits into
mainfrom
reflog/fix-lampshade-ack-desync
Open

build: bump lampshade to fix session desync that hung TestRoundTrip#684
reflog wants to merge 3 commits into
mainfrom
reflog/fix-lampshade-ack-desync

Conversation

@reflog

@reflog reflog commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Problem

CI on main occasionally fails with TestRoundTrip hanging for the full 10-minute test timeout (e.g. this run): 198/200 streams complete, one client goroutine stuck in io.ReadFull waiting for exactly one 1443-byte (MaxDataLen) frame, the matching server echo stuck waiting for more data, and every send/recv loop healthy and idle.

Root cause

A frame-parsing bug in lampshade's recvLoop: an ACK frame arriving for an already-closed stream was skipped without consuming its 4-byte acked-frames payload. The parser then misread those zero bytes as a padding header and silently discarded every remaining frame coalesced in the same session frame — permanently stalling whichever live streams' frames followed. With AckOnFirst: true (which our lampshade.Wrap sets), the server sends an empty ACK for the first data frame of every inbound session frame, so any stream that writes and quickly closes leaves such a stale ACK in flight; under TestRoundTrip's 100 concurrent streams on one session this occasionally kills a live stream's echo frame.

Fixed upstream in getlantern/lampshade#53 (with a regression test that reproduces the hang in ~15s before the fix). This PR bumps the dependency to that fix commit.

Note: pinned to the commit on the PR branch. If lampshade#53 gets merged with a different SHA (e.g. squash), re-pin to the merged commit before/after merging this.

Testing

  • go test ./lampshade/ -count=10 -race passes against the fix (previously the flake).
  • Upstream regression test fails pre-fix, passes post-fix (-count=5); full lampshade suite passes.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated an internal dependency to a newer version.

An ACK frame arriving for an already-closed stream left its 4-byte
payload unconsumed in the session-frame parser, which then misread
those zero bytes as a padding header and silently discarded every
remaining frame coalesced in the same session frame — permanently
stalling unrelated live streams. With AckOnFirst (which our Wrap sets)
this is easy to hit under concurrency and caused the rare 10-minute
TestRoundTrip timeouts in CI.

Fixed upstream in getlantern/lampshade#53.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@reflog, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ddf2ced5-409e-40b6-92d7-5b42ed51dbcd

📥 Commits

Reviewing files that changed from the base of the PR and between fc49c97 and 3890bcf.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (1)
  • go.mod

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 96b80916-5cf6-412c-8da9-7ca919fcee3a

📥 Commits

Reviewing files that changed from the base of the PR and between 82379fc and fc49c97.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (1)
  • go.mod

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The pull request updates the direct github.com/getlantern/lampshade dependency in go.mod to a newer pseudo-version.

Changes

Dependency update

Layer / File(s) Summary
Update lampshade requirement
go.mod
The direct github.com/getlantern/lampshade requirement now uses pseudo-version v0.0.0-20260821104346-0863c5c50ba1.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to fc49c

This localized dependency update applies the upstream fix for the session desynchronization hang, with the affected tests passing; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the dependency update and the session desynchronization issue it fixes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch reflog/fix-lampshade-ack-desync

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the github.com/getlantern/lampshade dependency to a newer pseudo-version that includes an upstream fix intended to prevent rare TestRoundTrip session desynchronization hangs in CI.

Changes:

  • Bump github.com/getlantern/lampshade to v0.0.0-20260821104346-0863c5c50ba1.
  • Update go.sum checksums to match the new lampshade version.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
go.mod Updates the required lampshade version to the fix commit.
go.sum Updates module checksums for the new lampshade pseudo-version.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread go.mod Outdated
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated no new comments.

getlantern/lampshade#53 is merged; point at the merge commit on master
instead of the PR branch head.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated no new comments.

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.

2 participants