Skip to content

Fix the intermittent unknown-op flake in the Node completion tests - #63

Merged
bbatsov merged 1 commit into
masterfrom
fix-node-completion-test-flake
Jul 18, 2026
Merged

Fix the intermittent unknown-op flake in the Node completion tests#63
bbatsov merged 1 commit into
masterfrom
fix-node-completion-test-flake

Conversation

@bbatsov

@bbatsov bbatsov commented Jul 18, 2026

Copy link
Copy Markdown
Member

The suitable-node test failed intermittently in CI with :status #{"error" "unknown-op"} and no completions. The standalone completion middleware only answers complete once piggieback has stored the cljs compiler-env in the session; until the Node repl finishes booting, the op falls through to nREPL's unknown-op. It's a harness startup race, not a production issue - a real cider-nrepl stack always has a completion handler, so it never hits this.

Gate with-repl-env on a working js/Ob completion before running the body, so the tests wait for the cljs completion path to be live. Verified stable over several local runs.

The standalone completion middleware only answers `complete` once piggieback
has stored the cljs compiler-env in the session. Until the Node repl finishes
booting, the op falls through to nREPL's `unknown-op` and the request comes
back with no completions - which intermittently failed `suitable-node` in CI.

Gate `with-repl-env` on a working `js/Ob` completion before running the body,
so the tests wait for the cljs completion path to be live. A real cider-nrepl
stack always has a completion handler, so it never hits this race.
@bbatsov
bbatsov merged commit c0a96a8 into master Jul 18, 2026
8 of 9 checks passed
@bbatsov
bbatsov deleted the fix-node-completion-test-flake branch July 18, 2026 10:38
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