Skip to content

fix(extensions): accept 'ready' response as valid reply to load action#146

Open
bryanchua5327 wants to merge 1 commit into
lightningpixel:mainfrom
bryanchua5327:fix/extension-load-ready-response
Open

fix(extensions): accept 'ready' response as valid reply to load action#146
bryanchua5327 wants to merge 1 commit into
lightningpixel:mainfrom
bryanchua5327:fix/extension-load-ready-response

Conversation

@bryanchua5327
Copy link
Copy Markdown

Some extensions (e.g. triposg) respond to the load action with a 'ready' message (including params_schema) rather than 'loaded'. The load() method previously only accepted 'loaded', causing a RuntimeError even though the extension had initialised successfully.

Accepting both 'ready' and 'loaded' as valid load responses fixes the crash. The params_schema sent with a 'ready' reply is already captured by _start(); handling it here is a no-op but keeps the contract clear.

Reproducer:
RuntimeError: [triposg/generate] Unexpected response to load:
{'type': 'ready', 'params_schema': [...]}

Some extensions (e.g. triposg) respond to the load action with a
'ready' message (including params_schema) rather than 'loaded'.
The load() method previously only accepted 'loaded', causing a
RuntimeError even though the extension had initialised successfully.

Accepting both 'ready' and 'loaded' as valid load responses fixes the
crash. The params_schema sent with a 'ready' reply is already captured
by _start(); handling it here is a no-op but keeps the contract clear.

Reproducer:
  RuntimeError: [triposg/generate] Unexpected response to load:
  {'type': 'ready', 'params_schema': [...]}
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