Skip to content

fix(code-intel): classify closed process pipes as crashes - #189

Merged
Qiyuanqiii merged 1 commit into
mainfrom
codex/fix-codeintel-closed-pipe-health
Aug 27, 2026
Merged

Qiyuanqiii merged 1 commit into
mainfrom
codex/fix-codeintel-closed-pipe-health

Conversation

@Qiyuanqiii

Copy link
Copy Markdown
Member

Summary

  • classify a wrapped os.ErrClosed from an owned LSP stdout pipe as crashed
  • add a deterministic regression assertion for the exact error shape observed on Linux

Root cause

After PR #188 merged, main CI run 33101468059 intermittently failed TestManagerBoundsCrashTimeoutCancellationProtocolAndOversizeFailures/crash. The owned helper process exited, but Cmd.Wait and the stdout read loop raced to publish the terminal transport error. When the read loop won with read LSP message: read |0: file already closed, healthForError did not recognize the wrapped os.ErrClosed and recorded unavailable instead of crashed.

The same SHA passed the PR Go suite and the Real LSP Ubuntu race suite, confirming that this is an existing scheduling-dependent classification gap rather than a typography regression. PR #161 fixed a different done-before-pending publication race; this patch preserves that ordering and only canonicalizes the equivalent closed-pipe crash signal.

Validation

  • go test -timeout 5m -count=1 ./internal/codeintel
  • classifier regression: 500 iterations
  • crash integration path: 200 iterations
  • focused race run: 25 iterations
  • go vet ./internal/codeintel
  • git diff --check

An independent review found no P0-P2 issues. The integration test continues to require crashed; this change does not weaken the expected behavior.

@Qiyuanqiii
Qiyuanqiii merged commit 02e52d5 into main Aug 27, 2026
17 of 18 checks passed
@Qiyuanqiii
Qiyuanqiii deleted the codex/fix-codeintel-closed-pipe-health branch August 27, 2026 19:19
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.

1 participant