Skip to content

Improve engine communication failure error reports - #13953

Closed
bcorey wants to merge 7 commits into
mainfrom
bcorey/improve-engine-connection-error-report
Closed

bcorey wants to merge 7 commits into
mainfrom
bcorey/improve-engine-connection-error-report

Conversation

@bcorey

@bcorey bcorey commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Wrote some error reporting improvements with codex to help me and paul debug engine connection failures.

Before:

    thread 'docs::kcl_doc::test::kcl_test_examples_std_helix_2' (61059438) panicked at kcl-lib/src/docs/kcl_doc.rs:1866:21:
Error testing example std-helix-2 for std::helix in /Users/bc/repos/modeling-app/rust/kcl-lib/std/prelude.kcl:
could not send request to the engine: could not send json over websocket: Trying to work with closed connection       

What it tells us:

  • engine connection closed

After:

    thread 'docs::kcl_doc::test::kcl_test_examples_std_helix_3' (61167552) panicked at kcl-lib/src/docs/kcl_doc.rs:1869:25:
Error testing example std-helix-3 for std::helix in /Users/bc/repos/modeling-app/rust/kcl-lib/std/prelude.kcl: could not send request to the engine: could not send json over websocket: Trying to work with closed connection; failed request:
modeling_cmd_batch_req : [EdgeLinesVisible, ObjectVisible, SetGridScale, ObjectVisible, SetDefaultSystemProperties];
last request written to WebSocket: modeling_cmd_req: SceneClearAll;
last modeling request written to WebSocket: modeling_cmd_req: SceneClearAll
(API call ID: unavailable: session data not received)   

What it tells us:

  • we failed to send this batch [x, y, z] to the engine
  • engine connection closed
  • we previously sent SceneClearAll to the engine
  • the engine never sent us session data

If the engine had sent us session data, we would have a handy ID to search logs with. since it hasn't, we can narrow down the kinds of issues we're facing.

@bcorey
bcorey requested review from a team as code owners September 16, 2026 20:19
@vercel

vercel Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
modeling-app Ready Ready Preview Sep 22, 2026 7:04pm UTC

Request Review

@codspeed

codspeed Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 159 untouched benchmarks
⏩ 129 skipped benchmarks1


Comparing bcorey/improve-engine-connection-error-report (da66fba) with main (984a13a)2

Open in CodSpeed

Footnotes

  1. 129 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on main (dacd00a) during the generation of this report, so 984a13a was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@bcorey

bcorey commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor Author

rebased onto main & tested errors. we now prioritize websocket closed messages when available as part of work done last week and do a better job of putting engine responses in the terminal output, so things look different.

Invalid pool

Error testing example std-appearance-hexString-2 for std::appearance::hexString in /Users/bc/repos/modeling-app/rust/kcl-lib/std/appearance.kcl:
WebSocket protocol error: Connection reset without closing handshake (Engine upgrade request ID: 8d86ff54-c63a-40f7-860c-41a627152eb6)   

EdgeLinesVisible on CPU

Error testing example std-array-concat-0 for std::array::concat in /Users/bc/repos/modeling-app/rust/kcl-lib/std/array.kcl:
command EdgeLinesVisible resulted in errors: 
Graphics have not been enabled for this geometry context (API call ID: 4ea5ba5f-20ec-4bd5-b672-1f9ad7a519b6)

PlaneSetColor on CPU

Error testing example std-appearance-hexString-3 for std::appearance::hexString in /Users/bc/repos/modeling-app/rust/kcl-lib/std/appearance.kcl:
command PlaneSetColor resulted in errors: 
Graphical views cannot be created when graphics are not enabled (API call ID: 9cdf0ae6-6e03-4772-aa8b-f47e7422f198) 

These are all the same as on main with the addition of the api call IDs on the modeling commands

This branch was successfully deployed

1 active deployment
Preview — da66fba3 Deployed Sep 22, 2026 by vercel[bot]
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