mergestorm 0.3.59 → 0.3.60
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/README.md +2 -2
- package/dist/stack-watch.d.ts +1 -0
- package/dist/stack-watch.js +6 -3
- package/dist/ui/banner.js +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,12 +45,12 @@ On a TTY, bare `mergestorm` (or `mergestorm shell`) opens a branded REPL: a comp
|
|
|
45
45
|
|
|
46
46
|
```
|
|
47
47
|
╭──────────────────────────────────────────────────────────────────────────────╮
|
|
48
|
-
│ ▀▀▀▀▀▀▀▀▀▀▘ mergestorm v0.3.
|
|
48
|
+
│ ▀▀▀▀▀▀▀▀▀▀▘ mergestorm v0.3.60 │
|
|
49
49
|
│ ▀▀▀▀▀▀▀▀▀ ● msk_live_… · maelstrom │
|
|
50
50
|
│ ▀▀▀▀▀▀ [████████░░░░░░░░░░░░░░░░░░░░░░] 25% used │
|
|
51
51
|
│ ▝▀▀▀▀▀ local reviews + stacked PRs · mergestorm.ai │
|
|
52
52
|
│ ▝▀▀▘ review a diff · usage for tabs · /help for all commands │
|
|
53
|
-
│ ▀ New in v0.3.
|
|
53
|
+
│ ▀ New in v0.3.60: Timed stack wait rides out a slow last read │
|
|
54
54
|
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
55
55
|
mergestorm
|
|
56
56
|
╭──────────────────────────────────────────────────────────────────────────────╮
|
package/dist/stack-watch.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare const STACK_WATCH_DEFAULT_TIMEOUT_MS = 45000;
|
|
|
7
7
|
export declare const STACK_WATCH_BUSY_RECHECK_S = 15;
|
|
8
8
|
export declare const STACK_WATCH_ONE_SHOT_READ_TIMEOUT_MS = 30000;
|
|
9
9
|
export declare const STACK_WATCH_DEADLINE_SNAPSHOT_TIMEOUT_MS = 5000;
|
|
10
|
+
export declare const STACK_WATCH_CLOSING_READ_RESERVE_MS = 10000;
|
|
10
11
|
/** Resume selectors are fixed for the entire wait, including transient retries. */
|
|
11
12
|
export type StackWatchCursor = {
|
|
12
13
|
readonly stackId: string;
|
package/dist/stack-watch.js
CHANGED
|
@@ -8,6 +8,7 @@ export const STACK_WATCH_DEFAULT_TIMEOUT_MS = 45_000;
|
|
|
8
8
|
export const STACK_WATCH_BUSY_RECHECK_S = 15;
|
|
9
9
|
export const STACK_WATCH_ONE_SHOT_READ_TIMEOUT_MS = DEFAULT_API_TIMEOUT_MS;
|
|
10
10
|
export const STACK_WATCH_DEADLINE_SNAPSHOT_TIMEOUT_MS = 5_000;
|
|
11
|
+
export const STACK_WATCH_CLOSING_READ_RESERVE_MS = 10_000;
|
|
11
12
|
export class StackWatchTimeoutError extends Error {
|
|
12
13
|
lastEnvelope;
|
|
13
14
|
constructor(lastEnvelope) {
|
|
@@ -80,7 +81,8 @@ export async function pollStackWatch(cfg, stackId, opts = {}) {
|
|
|
80
81
|
signal: opts.signal, timeoutMs: route.includes("&wait=")
|
|
81
82
|
? Number(new URL(route, "https://local").searchParams.get("wait")) * 1000 + 5_000
|
|
82
83
|
: finalSnapshot
|
|
83
|
-
? timeoutMs === 0 ? STACK_WATCH_ONE_SHOT_READ_TIMEOUT_MS
|
|
84
|
+
? timeoutMs === 0 ? STACK_WATCH_ONE_SHOT_READ_TIMEOUT_MS
|
|
85
|
+
: Math.max(STACK_WATCH_DEADLINE_SNAPSHOT_TIMEOUT_MS, Math.min(DEFAULT_API_TIMEOUT_MS, deadline - now()))
|
|
84
86
|
: Math.max(1, Math.min(30_000, deadline - now())),
|
|
85
87
|
});
|
|
86
88
|
}
|
|
@@ -172,9 +174,10 @@ export async function pollStackWatch(cfg, stackId, opts = {}) {
|
|
|
172
174
|
evaluate(stack, queue.entries);
|
|
173
175
|
if (lastEnvelope.status === "attention" || timeoutMs === 0 || terminal)
|
|
174
176
|
return seal(lastEnvelope);
|
|
175
|
-
|
|
177
|
+
const closingReadReserveMs = Math.min(STACK_WATCH_CLOSING_READ_RESERVE_MS, timeoutMs / 4);
|
|
178
|
+
while (deadline - now() > closingReadReserveMs) {
|
|
176
179
|
const heldAt = now();
|
|
177
|
-
const seconds = Math.min(lastEnvelope.busy.length ? STACK_WATCH_BUSY_RECHECK_S : 45, Math.max(1, Math.ceil((deadline - heldAt) / 1000)));
|
|
180
|
+
const seconds = Math.min(lastEnvelope.busy.length ? STACK_WATCH_BUSY_RECHECK_S : 45, Math.max(1, Math.ceil((deadline - heldAt - closingReadReserveMs) / 1000)));
|
|
178
181
|
const seen = queue.fingerprint ? `&seen=${encodeURIComponent(queue.fingerprint)}` : "";
|
|
179
182
|
const held = await readQueue(`${queueRoute}&wait=${seconds}${seen}`);
|
|
180
183
|
if (JSON.stringify(held.entries) === JSON.stringify(queue.entries)) {
|
package/dist/ui/banner.js
CHANGED
|
@@ -215,6 +215,9 @@ const WHATS_NEW = {
|
|
|
215
215
|
"0.3.59": [
|
|
216
216
|
"One-shot stack wait rides out a slow read",
|
|
217
217
|
],
|
|
218
|
+
"0.3.60": [
|
|
219
|
+
"Timed stack wait rides out a slow last read",
|
|
220
|
+
],
|
|
218
221
|
};
|
|
219
222
|
function densityFromVariant(variant) {
|
|
220
223
|
if (variant === "mini" || variant === "nano")
|
package/package.json
CHANGED