fix(gui): CI activation order + review-bot findings

The session-title snapshot exposed a real activation race: ui-trajectory
and ui-question register into conversation-declared slots but only
injected 'slots', so nothing ordered their applies after ui-conversation's
— register() into the undeclared slot threw and the entry FAILED. Both now
inject 'conversation' as an ordering edge (documented as such; specs stub
the service where the bench declares the slot itself).

Review-bot findings, all three applied: the module loader's load sink
cross-checks the handoff id against the arriving row (a mis-stamped bundle
can no longer register under another entry's identity); the default
execute seam removes the inline script node right after its synchronous
execution (repeated HMR rebuilds no longer accumulate dead nodes); a
throwing onRebuilt subscriber is contained per-listener and routed to
onError instead of escaping the fs.watchFile callback.
This commit is contained in:
imccyu
2026-07-24 01:42:29 +08:00
parent c8c43fb399
commit d5cd73a9d9
8 changed files with 58 additions and 9 deletions

View File

@@ -247,7 +247,15 @@ export function createHostWebPluginRegistry(deps: WebPluginRegistryDeps): HostWe
return
}
if (rev === undefined || rev === before) return
for (const notify of rebuildListeners) notify(id, rev)
for (const notify of rebuildListeners) {
// A throwing subscriber must not escape the fs.watchFile callback
// (that would skip later subscribers and can kill the process).
try {
notify(id, rev)
} catch (error) {
deps.onError(error instanceof Error ? error : new Error(String(error)))
}
}
}
watchFile(record.clientPath, { interval: watchInterval, persistent: false }, listener)
watched.set(id, { path: record.clientPath, listener })