Repository navigation
fix(desktop): preserve plugin crash diagnostics - #766
Merged
Merged
Conversation
A report could only ever say `plugin host process exited: <id>`: the runtime already had the process's exit code but kept it in the audit record, so the sentence a user can paste carried no diagnosis at all (issue #747 was exactly that line, with no logs). - The exit code now reaches the load error, the `failed` service state, the `plugin.crash` audit record and the `plugin` log channel. On Windows a hard fault (0xC0000005 and friends, which Electron delivers as a negative signed int) and a plugin's own `process.exit(1)` are different bugs; the code is printed with its unsigned hex form so both readings agree. - The plugin's newest output line rides with it. The runtime keeps the last three stdout/stderr lines per plugin (each bounded at 400 characters) and quotes the newest in the load error and the audit record, because a plugin that died on a thrown error usually printed the reason first. Every line still lands in the audit thread as `plugin.stdio`. - Nothing new is persisted and no permission, API or protocol surface changes. The fixture in `plugin-services.test.mjs` now writes a line to stderr before exiting, and asserts the exit code on the service state and both the code and the stderr line on the crash audit record.
This was referenced Sep 21, 2026
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
基于 PR #756 的修复版,包含原始提交并修复审查发现的问题:
exitCodeHex。验证:
plugin-work-panel-views.test.mjs因 worktree 缺少src/components/workpanel/WorkPanel.tsx在收集阶段失败