Host plugin failures are invisible in dsh web: a throwing or non-effect apply() marks the fiber FAILED with no output, and TypeError('Invalid effect') names neither the plugin nor the value
#8633
longjucheng
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
A host plugin whose
apply()throws, or returns a value Cordis cannot collect as an effect, is marked FAILED;dsh webprints nothing.Reproduction
webprofile (dsh plugin --profile web add link:./plugin).apply(ctx)throw, or make it return a plain object (apply: ctx => helper(ctx)wherehelperreturns{ … }).Current behavior
Fiber._reloadawaits_execute, catches the throw, callsthis.ctx.logger.error(reason), sets_error, unloads the effects registered so far and leaves the fiber FAILED without rethrowing (vendor/cordis/src/fiber.ts:646–665). With no exporter in thewebprofile (Two verified cordis logger bugs: warnings never reach the buffer, and exporter disposal removes the wrong exporter #5145) the logger line has no sink._execute(fiber.ts:357–398) collects a function, awaits a thenable, iterates an iterable, and throwsTypeError('Invalid effect')for any other non-nullish value. The message carries neither the fiber's plugin name nor the value's type.Expected behavior
dsh web's terminal with the plugin id and the error message (cf. Client plugin-boot failures are swallowed: “The client Loader did not provide an error message” (a plugin's rejected apply() → whole app into recovery mode) #7891 for the client Loader).Invalid effectnames the fiber and the returned value's type or constructor.Environment
@deepseek-ai/dshsource checkout at tagdsh-v0.2.0-rc.1, dev launchpnpm dsh web(node --import tsx/esm apps/cli/src/bin.ts web)session.jsonl.zstd,.v2,.v3) presentAll reactions