@vellumai/cli 0.8.12-dev.202606151312.6aebfa4 → 0.8.12-dev.202606151644.f1e3fed
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -155,10 +155,14 @@ describe("sleep command", () => {
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
expect(stopProcessByPidFileMock).toHaveBeenCalledTimes(2);
|
|
158
|
+
// The assistant stop passes a generous 120s grace so the daemon's WAL
|
|
159
|
+
// checkpoint completes before any SIGKILL (default 2s would truncate it).
|
|
158
160
|
expect(stopProcessByPidFileMock).toHaveBeenNthCalledWith(
|
|
159
161
|
1,
|
|
160
162
|
join(assistantRootDir, "workspace", "vellum.pid"),
|
|
161
163
|
"assistant",
|
|
164
|
+
undefined,
|
|
165
|
+
120_000,
|
|
162
166
|
);
|
|
163
167
|
expect(stopProcessByPidFileMock).toHaveBeenNthCalledWith(
|
|
164
168
|
2,
|
package/src/commands/sleep.ts
CHANGED
|
@@ -134,9 +134,18 @@ export async function sleep(): Promise<void> {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
+
// Stop assistant — use a generous timeout. On SIGTERM the daemon runs a
|
|
138
|
+
// WAL checkpoint before exiting, which can take several seconds on a
|
|
139
|
+
// multi-GB database. The default 2s grace in stopProcess() would SIGKILL a
|
|
140
|
+
// healthy daemon mid-checkpoint, forcing a costly multi-minute WAL recovery
|
|
141
|
+
// on the next start. The timeout is only a SIGKILL ceiling — stopProcess
|
|
142
|
+
// returns as soon as the process exits, so this adds no delay in the common
|
|
143
|
+
// case and only applies when the daemon is genuinely wedged.
|
|
137
144
|
const assistantStopped = await stopProcessByPidFile(
|
|
138
145
|
assistantPidFile,
|
|
139
146
|
"assistant",
|
|
147
|
+
undefined,
|
|
148
|
+
120_000,
|
|
140
149
|
);
|
|
141
150
|
if (!assistantStopped) {
|
|
142
151
|
console.log("Assistant is not running.");
|