You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(tunnelserver): preserve terminal failure status during exit #1798
--- FAIL: TestLifecycleTerminalSuite (31.03s)
--- FAIL: TestLifecycleTerminalSuite/TestOversizedInputFrame
Error Trace: lifecycle_terminal_test.go:776
Error: Not equal:
expected: 0x8 (codes.ResourceExhausted)
actual : 0x2 (codes.Unknown)
Root Cause Summary
The owner-side input validator already returns ResourceExhausted. Static investigation found that terminalAttachment.Exit ignores an already-recorded session failure. Cancellation publishes Canceled before canceling the context, allowing Exit to attempt another send on a terminated stream. A send-side io.EOF can then escape as Unknown instead of preserving the receive-side status. The relevant source blobs are unchanged between the failed commit and current main 4165583. Native repeated tests passed 5100/5100, so the race has not been reproduced by sampling; a deterministic regression will verify the error precedence.
Acceptance Criteria
Preserve an established session failure when Exit is called, without another stream send.
Add deterministic regression coverage that fails before the fix and passes after it; retain the original oversized-frame assertion.
Pass go test -v -run TestLifecycleTerminalSuite/TestOversizedInputFrame ./pkg/agent/tunnelserver, race-enabled package checks, mise run cli:format, mise run cli:lint:ci, and mise run cli:test.
Applicable CI green on the final PR head, Greptile confidence >=4/5, successful completed CodeRabbit review, and verified signed commits.
Activity
skevetter commentedon Nov 8, 2026
Remediation submitted in PR #1799. Head: 64fabb2. Local validation and signed-commit verification completed; hosted CI and reviewer gates are pending.