@runuai/host 0.9.149 → 0.9.150
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/lib/orchestrator.ts +17 -12
- package/package.json +1 -1
- package/src/main.ts +1 -1
package/lib/orchestrator.ts
CHANGED
|
@@ -8314,6 +8314,17 @@ async function recoverOneDockerTask(
|
|
|
8314
8314
|
lifecycle?: RecoveryTaskConsumers,
|
|
8315
8315
|
): Promise<boolean> {
|
|
8316
8316
|
if (!isCurrent()) return true;
|
|
8317
|
+
// Recovery is sanctioned private maintenance while public admission is
|
|
8318
|
+
// deliberately `checking`. Its container work is fenced by this daemon
|
|
8319
|
+
// epoch instead of the public operational bit: work it starts keeps going
|
|
8320
|
+
// while the generation is current, and a superseded one stops.
|
|
8321
|
+
const admitRecoveryContainerWork = (): void => {
|
|
8322
|
+
if (!isCurrent()) {
|
|
8323
|
+
throw new ContainerRuntimeUnavailableError(
|
|
8324
|
+
"container runtime recovery generation was superseded",
|
|
8325
|
+
);
|
|
8326
|
+
}
|
|
8327
|
+
};
|
|
8317
8328
|
const composeProject = task.composeProject;
|
|
8318
8329
|
if (!composeProject) {
|
|
8319
8330
|
// We never wrote a compose project name for this row — must be
|
|
@@ -8463,7 +8474,9 @@ async function recoverOneDockerTask(
|
|
|
8463
8474
|
// ~8h later. Cheap with the per-user access-token cache — one exchange
|
|
8464
8475
|
// per user, every task re-injects from it. Best-effort.
|
|
8465
8476
|
if (task.ownerUserId) {
|
|
8466
|
-
void reconcileTaskGitAuth(task.taskId, task.ownerUserId
|
|
8477
|
+
void reconcileTaskGitAuth(task.taskId, task.ownerUserId, {
|
|
8478
|
+
admitContainerWork: admitRecoveryContainerWork,
|
|
8479
|
+
}).catch((err) =>
|
|
8467
8480
|
console.warn(
|
|
8468
8481
|
`[github] task ${task.taskId}: running recovery reconciliation failed: ${
|
|
8469
8482
|
err instanceof Error ? err.message : String(err)
|
|
@@ -8602,17 +8615,9 @@ async function recoverOneDockerTask(
|
|
|
8602
8615
|
if (task.ownerUserId) {
|
|
8603
8616
|
try {
|
|
8604
8617
|
await reconcileTaskGitAuth(task.taskId, task.ownerUserId, {
|
|
8605
|
-
//
|
|
8606
|
-
//
|
|
8607
|
-
|
|
8608
|
-
// before uai-init without letting stale recovery keep mutating.
|
|
8609
|
-
admitContainerWork: () => {
|
|
8610
|
-
if (!isCurrent()) {
|
|
8611
|
-
throw new ContainerRuntimeUnavailableError(
|
|
8612
|
-
"container runtime recovery generation was superseded",
|
|
8613
|
-
);
|
|
8614
|
-
}
|
|
8615
|
-
},
|
|
8618
|
+
// Before uai-init, so private dependencies resolve; fenced by this
|
|
8619
|
+
// recovery's epoch, not the public operational bit.
|
|
8620
|
+
admitContainerWork: admitRecoveryContainerWork,
|
|
8616
8621
|
});
|
|
8617
8622
|
if (!isCurrent()) return true;
|
|
8618
8623
|
} catch (err) {
|
package/package.json
CHANGED
package/src/main.ts
CHANGED
|
@@ -577,7 +577,7 @@ try {
|
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
579
|
console.warn(
|
|
580
|
-
`[project-env] bindings
|
|
580
|
+
`[project-env] bindings are off until the runtime floor is persisted (${error instanceof Error ? error.message : String(error)}); an update that is still activating turns them on when it finishes, anything else needs a restart`,
|
|
581
581
|
);
|
|
582
582
|
}
|
|
583
583
|
|