mirror of
https://github.com/morluto/rea.git
synced 2026-11-14 02:32:54 +00:00
fix(setup): materialize the pinned package-runner cache before the first client start (#7032)
* fix(setup): materialize the pinned package-runner cache before the first client start Package runners key their package cache by the requested spec, so the entry installed for the @latest invocation that ran setup cannot serve the pinned rea-agents@<version> registration. The first client start installed that entry inside the client's MCP startup deadline and timed out (three consecutive 30 s timeouts observed in one client log; a controlled cold install with every tarball already cached took 22 s). Setup now materializes the pinned entry once after applying registrations: best-effort, bounded by a timeout, launched from a neutral working directory, and non-fatal on failure. The setup result carries the prewarm summary, interactive output prints a warning when the step fails, and direct launcher registrations keep skipping it. Fixes #7027 * fix(setup): gate prewarm to applied registrations and supervise the runner tree Address review findings on the prewarm step: - Gate the prewarm on at least one applied client registration (configured_<client>), so an empty plan or a skill-only run never installs into the package-runner cache; the step now only follows registrations the user approved in this transaction. - Replace execFileOutput with a supervised spawn: on timeout the whole runner tree stops through cleanupWindowsProcessTree on Windows and a process-group kill on POSIX, because killing only the direct child leaves npm holding the inherited output pipes past the deadline. - Emit started and completed progress events around the prewarm so an interactive cold install no longer looks like a frozen setup. * fix(setup): forward terminal interrupts to the detached prewarm runner A detached POSIX package-runner group no longer receives the terminal's Ctrl-C, so setup could exit while the runner kept installing in the background. The supervised launch now registers SIGINT and SIGTERM forwarding for the duration of the prewarm: the runner tree is stopped through the same family cleanup as the timeout, and the default termination is restored afterwards. An interrupted launch reports a failure reason instead of a hang.
This commit is contained in:
1 parent
0354759370
commit
6a96f4fa4a
8 files changed
+680
-1
No files matched your search
@@ -100,6 +100,8 @@ export const renderInteractiveSetupResult = (
|
||||
.map(([client]) => clientDisplayNames.get(client) ?? client);
|
||||
const readyClients = readyAgentClients(result, changedClients);
|
||||
renderReadyCapabilities(result, readyClients, environment);
|
||||
if (result.prewarm?.status === "failed")
|
||||
writeLine(`! ${result.prewarm.reason}`);
|
||||
outro(
|
||||
changedClients.length === 0
|
||||
? "REA is ready for local app analysis."
|
||||
|
||||
Reference in new issue
Block a user