@vzn/vx 0.0.69 → 0.0.71
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 +5 -5
- package/src/graph/scheduler.ts +11 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vzn/vx",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.71",
|
|
4
4
|
"description": "An open, extensible monorepo task runner.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"node": ">=18"
|
|
18
18
|
},
|
|
19
19
|
"optionalDependencies": {
|
|
20
|
-
"@vzn/vx-linux-x64": "0.0.
|
|
21
|
-
"@vzn/vx-linux-arm64": "0.0.
|
|
22
|
-
"@vzn/vx-darwin-x64": "0.0.
|
|
23
|
-
"@vzn/vx-darwin-arm64": "0.0.
|
|
20
|
+
"@vzn/vx-linux-x64": "0.0.71",
|
|
21
|
+
"@vzn/vx-linux-arm64": "0.0.71",
|
|
22
|
+
"@vzn/vx-darwin-x64": "0.0.71",
|
|
23
|
+
"@vzn/vx-darwin-arm64": "0.0.71"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@anthropic-ai/sandbox-runtime": "^0.0.76"
|
package/src/graph/scheduler.ts
CHANGED
|
@@ -428,23 +428,24 @@ export async function runGraph(options: ScheduleOptions): Promise<Map<string, Ta
|
|
|
428
428
|
const poolOf = options.poolOf
|
|
429
429
|
const poolActive = new Map<string, number>()
|
|
430
430
|
// A pooled task is admitted against ITS pool's capacity, a local one
|
|
431
|
-
// against `concurrency`; pooled tasks reserve no local resources.
|
|
431
|
+
// against `concurrency`; pooled tasks reserve no local resources. A
|
|
432
|
+
// restore is local disk work wherever its task was placed: on the pool's
|
|
433
|
+
// arm it bypassed the restore lane's cap.
|
|
432
434
|
const hasRoom = (id: string): boolean => {
|
|
435
|
+
if (inRestoreTier(id)) return restoreRoom()
|
|
433
436
|
const pool = poolOf?.(id)
|
|
434
|
-
if (pool === undefined)
|
|
435
|
-
return inRestoreTier(id) ? restoreRoom() : execRoom()
|
|
436
|
-
}
|
|
437
|
+
if (pool === undefined) return execRoom()
|
|
437
438
|
return (poolActive.get(pool.name) ?? 0) < pool.capacity
|
|
438
439
|
}
|
|
439
440
|
const admit = (id: string): (() => void) => {
|
|
441
|
+
if (inRestoreTier(id)) {
|
|
442
|
+
activeRestore++
|
|
443
|
+
return () => {
|
|
444
|
+
activeRestore--
|
|
445
|
+
}
|
|
446
|
+
}
|
|
440
447
|
const pool = poolOf?.(id)
|
|
441
448
|
if (pool === undefined) {
|
|
442
|
-
if (inRestoreTier(id)) {
|
|
443
|
-
activeRestore++
|
|
444
|
-
return () => {
|
|
445
|
-
activeRestore--
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
449
|
active++
|
|
449
450
|
return () => {
|
|
450
451
|
active--
|