@foldrun/core 23.1.3 → 23.2.0
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/dist/src/ops-log.js
CHANGED
|
@@ -103,6 +103,9 @@ export const FIELDS = {
|
|
|
103
103
|
// How many, how long, how much.
|
|
104
104
|
count: "num", ms: "num", secs: "num", bytes: "num", usd: "num", attempt: "num",
|
|
105
105
|
step: "num", port: "num", status: "num", exitCode: "num", percent: "num", tries: "num",
|
|
106
|
+
// A pass over many things (the mirror loop's, 15 Nov 2026: these were
|
|
107
|
+
// dropped, and its lines read `"dropped":2` with no numbers).
|
|
108
|
+
failed: "num", removed: "num", total: "num",
|
|
106
109
|
// What kind.
|
|
107
110
|
op: "word", role: "word", outcome: "word", reason: "word", stream: "word", kind: "word",
|
|
108
111
|
verdict: "word", phase: "word", signal: "code", where: "word",
|
|
@@ -246,10 +246,14 @@ export declare function syncTenantFromHeads(tenant: string): Promise<{
|
|
|
246
246
|
removed: number;
|
|
247
247
|
failed: number;
|
|
248
248
|
}>;
|
|
249
|
+
/** `total` is how many workspaces the pass looked at, so a caller can tell
|
|
250
|
+
* "every one failed" (the store is unreachable: back off) from "one of
|
|
251
|
+
* forty failed" (15 Nov 2026). */
|
|
249
252
|
export declare function syncAllFromHeads(): Promise<{
|
|
250
253
|
synced: number;
|
|
251
254
|
removed: number;
|
|
252
255
|
failed: number;
|
|
256
|
+
total: number;
|
|
253
257
|
}>;
|
|
254
258
|
/** Every account that still has revision state: a head in the store, a journal
|
|
255
259
|
* entry in any journal store, or changes queued in this process. A pod that is
|
|
@@ -1807,14 +1807,18 @@ export async function syncTenantFromHeads(tenant) {
|
|
|
1807
1807
|
}
|
|
1808
1808
|
return out;
|
|
1809
1809
|
}
|
|
1810
|
+
/** `total` is how many workspaces the pass looked at, so a caller can tell
|
|
1811
|
+
* "every one failed" (the store is unreachable: back off) from "one of
|
|
1812
|
+
* forty failed" (15 Nov 2026). */
|
|
1810
1813
|
export async function syncAllFromHeads() {
|
|
1811
1814
|
const deps = S.backend;
|
|
1812
|
-
const out = { synced: 0, removed: 0, failed: 0 };
|
|
1815
|
+
const out = { synced: 0, removed: 0, failed: 0, total: 0 };
|
|
1813
1816
|
if (!deps?.revisions.allHeads || !mirrorOn())
|
|
1814
1817
|
return out;
|
|
1815
1818
|
const all = await deps.revisions.allHeads();
|
|
1816
1819
|
const seen = new Set(all.map((h) => key(h.tenant, h.workspace)));
|
|
1817
1820
|
const todo = [...all.map((h) => ({ tenant: h.tenant, workspace: h.workspace })), ...mirroredWorkspaces().filter((w) => !seen.has(key(w.tenant, w.workspace)))];
|
|
1821
|
+
out.total = todo.length;
|
|
1818
1822
|
for (const w of todo) {
|
|
1819
1823
|
try {
|
|
1820
1824
|
const r = await syncFromHeads(w.tenant, w.workspace);
|
package/package.json
CHANGED
package/src/ops-log.ts
CHANGED
|
@@ -112,6 +112,9 @@ export const FIELDS: Record<string, Kind> = {
|
|
|
112
112
|
// How many, how long, how much.
|
|
113
113
|
count: "num", ms: "num", secs: "num", bytes: "num", usd: "num", attempt: "num",
|
|
114
114
|
step: "num", port: "num", status: "num", exitCode: "num", percent: "num", tries: "num",
|
|
115
|
+
// A pass over many things (the mirror loop's, 15 Nov 2026: these were
|
|
116
|
+
// dropped, and its lines read `"dropped":2` with no numbers).
|
|
117
|
+
failed: "num", removed: "num", total: "num",
|
|
115
118
|
// What kind.
|
|
116
119
|
op: "word", role: "word", outcome: "word", reason: "word", stream: "word", kind: "word",
|
|
117
120
|
verdict: "word", phase: "word", signal: "code", where: "word",
|
|
@@ -1818,13 +1818,17 @@ export async function syncTenantFromHeads(tenant: string): Promise<{ synced: num
|
|
|
1818
1818
|
return out;
|
|
1819
1819
|
}
|
|
1820
1820
|
|
|
1821
|
-
|
|
1821
|
+
/** `total` is how many workspaces the pass looked at, so a caller can tell
|
|
1822
|
+
* "every one failed" (the store is unreachable: back off) from "one of
|
|
1823
|
+
* forty failed" (15 Nov 2026). */
|
|
1824
|
+
export async function syncAllFromHeads(): Promise<{ synced: number; removed: number; failed: number; total: number }> {
|
|
1822
1825
|
const deps = S.backend;
|
|
1823
|
-
const out = { synced: 0, removed: 0, failed: 0 };
|
|
1826
|
+
const out = { synced: 0, removed: 0, failed: 0, total: 0 };
|
|
1824
1827
|
if (!deps?.revisions.allHeads || !mirrorOn()) return out;
|
|
1825
1828
|
const all = await deps.revisions.allHeads();
|
|
1826
1829
|
const seen = new Set(all.map((h) => key(h.tenant, h.workspace)));
|
|
1827
1830
|
const todo = [...all.map((h) => ({ tenant: h.tenant, workspace: h.workspace })), ...mirroredWorkspaces().filter((w) => !seen.has(key(w.tenant, w.workspace)))];
|
|
1831
|
+
out.total = todo.length;
|
|
1828
1832
|
for (const w of todo) {
|
|
1829
1833
|
try {
|
|
1830
1834
|
const r = await syncFromHeads(w.tenant, w.workspace);
|