Skip to content

WIP: unstick plugin PTY acceptance keep-alive hang on macOS CI - #5408

Draft
Hmbown wants to merge 2 commits into
codex/v098-final-20260814from
cursor/macos-plugin-e2e-keepalive-206d
Draft

WIP: unstick plugin PTY acceptance keep-alive hang on macOS CI#5408
Hmbown wants to merge 2 commits into
codex/v098-final-20260814from
cursor/macos-plugin-e2e-keepalive-206d

Conversation

@Hmbown

@Hmbown Hmbown commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Summary

Investigates the required CI / Test (macos-latest) failure on #5407.

Job: https://github.com/Hmbown/CodeWhale/actions/runs/31884025530/job/95018096669

The cucumber test plugin_toml_binary_lifecycle_skill_and_stdio_mcp_acceptance fails at ~82s with no ---- stdout ---- body. The same signature is on origin/main (5ac75add4, job https://github.com/Hmbown/CodeWhale/actions/runs/31870651757/job/94978674482) and the parent. Ubuntu does not run this suite on PRs. This is a pre-existing test-fixture bug, not a #5407 product regression.

82s is ci_scaled(20s) plus cucumber overhead. Slash commands do not need the model; the first chat POST (call plugin echo) is what should surface Do you want to proceed?. The hermetic tiny_http fixture used read_to_string, which waits for EOF. An HTTP/1.1 keep-alive client never closes, so the single-threaded server never answers. GitHub then drops the huge debug_dump panic, which is why the log only names the test.

This change:

  • reads Content-Length only and sends Connection: close
  • adds a 2s keep-alive POST regression that fails if the fixture hangs again
  • CI-scales wait_for_log like every other PTY wait
  • fails with a short screen/log dump instead of a 52x200 frame GitHub swallows

Ignoring the required check would be dishonest. Skipping the test would be dishonest. This is a real fixture fix.

Testing

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features --locked (warning-free under the CI allow list)
  • cargo test --workspace --all-features --locked
  • Targeted: cargo test -p codewhale-tui --test cucumber --features long-running-tests limited_http_body_stops_at_content_length hermetic_model_server_answers_http11_keepalive_post plugin_toml_binary_lifecycle_skill_and_stdio_mcp_acceptance -- --test-threads=1

Checklist

  • Updated docs or comments as needed
  • Added or updated tests where relevant
  • Verified TUI behavior manually if UI changes
  • Harvested/co-authored credit uses a GitHub numeric noreply address
Open in Web Open in Cursor 

cursoragent and others added 2 commits August 15, 2026 13:49
The macos CI cucumber acceptance
plugin_toml_binary_lifecycle_skill_and_stdio_mcp_acceptance dies at ~82s
with no panic body. That wall time is ci_scaled(20s). The hermetic
tiny_http fixture read POST bodies with read_to_string, which waits for
EOF; a keep-alive client never closes, so the single-threaded server
never answers the first chat POST.

Read Content-Length only, send Connection: close, cover the keep-alive
POST with a 2s fixture test, CI-scale wait_for_log, and fail with a
short screen/log dump GitHub Actions will actually keep.

Agent-assisted work. Nothing published.

Co-authored-by: Hunter Bown <Hmbown@users.noreply.github.com>
The keep-alive fixture fix unblocked the first chat POST, then the
same scenario died locally waiting for `/plugin trust demo <token>`.
The token is two full SHA-256 digests (129 chars). Transcript cards
wrap before that, so a single-line matcher never sees it.

Join trimmed frame lines, require the 64-hex.64-hex pair, dump head
and tail on failure, and cover the wrap with a unit test.

Agent-assisted work. Nothing published.

Co-authored-by: Hunter Bown <Hmbown@users.noreply.github.com>
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