@indigoai-us/hq-cloud 6.16.46-alpha.0 → 6.16.46
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/cli/rescue-core.d.ts +7 -0
- package/dist/cli/rescue-core.d.ts.map +1 -1
- package/dist/cli/rescue-core.js +36 -22
- package/dist/cli/rescue-core.js.map +1 -1
- package/dist/cli/rescue-realpath.test.d.ts +2 -0
- package/dist/cli/rescue-realpath.test.d.ts.map +1 -0
- package/dist/cli/rescue-realpath.test.js +109 -0
- package/dist/cli/rescue-realpath.test.js.map +1 -0
- package/dist/cli/rescue-source-switch-floor.test.d.ts +2 -0
- package/dist/cli/rescue-source-switch-floor.test.d.ts.map +1 -0
- package/dist/cli/rescue-source-switch-floor.test.js +210 -0
- package/dist/cli/rescue-source-switch-floor.test.js.map +1 -0
- package/dist/cli/sync-scope.test.js +0 -8
- package/dist/cli/sync-scope.test.js.map +1 -1
- package/dist/cli/sync.d.ts.map +1 -1
- package/dist/cli/sync.js +76 -135
- package/dist/cli/sync.js.map +1 -1
- package/dist/cli/sync.test.js +1 -11
- package/dist/cli/sync.test.js.map +1 -1
- package/dist/s3.d.ts +0 -1
- package/dist/s3.d.ts.map +1 -1
- package/dist/s3.js +2 -20
- package/dist/s3.js.map +1 -1
- package/package.json +1 -2
- package/dist/cli/onepass-pull-planner-regressions.test.d.ts +0 -2
- package/dist/cli/onepass-pull-planner-regressions.test.d.ts.map +0 -1
- package/dist/cli/onepass-pull-planner-regressions.test.js +0 -300
- package/dist/cli/onepass-pull-planner-regressions.test.js.map +0 -1
- package/dist/cli/onepass-pull-planner.test.d.ts +0 -2
- package/dist/cli/onepass-pull-planner.test.d.ts.map +0 -1
- package/dist/cli/onepass-pull-planner.test.js +0 -266
- package/dist/cli/onepass-pull-planner.test.js.map +0 -1
- package/dist/cli/streaming-pull-planner.bench.test.d.ts +0 -15
- package/dist/cli/streaming-pull-planner.bench.test.d.ts.map +0 -1
- package/dist/cli/streaming-pull-planner.bench.test.js +0 -273
- package/dist/cli/streaming-pull-planner.bench.test.js.map +0 -1
- package/dist/s3.list-cost.test.d.ts +0 -2
- package/dist/s3.list-cost.test.d.ts.map +0 -1
- package/dist/s3.list-cost.test.js +0 -51
- package/dist/s3.list-cost.test.js.map +0 -1
- package/dist/sync/remote-file-spool.d.ts +0 -16
- package/dist/sync/remote-file-spool.d.ts.map +0 -1
- package/dist/sync/remote-file-spool.js +0 -91
- package/dist/sync/remote-file-spool.js.map +0 -1
- package/dist/sync/remote-file-spool.test.d.ts +0 -2
- package/dist/sync/remote-file-spool.test.d.ts.map +0 -1
- package/dist/sync/remote-file-spool.test.js +0 -77
- package/dist/sync/remote-file-spool.test.js.map +0 -1
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Fails-first gates for the one-pass all-mode planner, based on 481138a.
|
|
3
|
-
* Exercise sync -> streamRemoteFiles -> ObjectIO, with fresh pages on EVERY
|
|
4
|
-
* pass. Do not import sync.test.ts's firstPassFilesByContext caching double.
|
|
5
|
-
* Stop at the public plan event so no transfer or cloud mutation can run.
|
|
6
|
-
*/
|
|
7
|
-
import * as fs from "node:fs";
|
|
8
|
-
import * as os from "node:os";
|
|
9
|
-
import * as path from "node:path";
|
|
10
|
-
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
11
|
-
import { clearContextCache } from "../context.js";
|
|
12
|
-
import * as journalModule from "../journal.js";
|
|
13
|
-
import { readJournal, releaseCachedAreaJournalMigrations, writeJournal } from "../journal.js";
|
|
14
|
-
import { setObjectIOFactory, } from "../object-io.js";
|
|
15
|
-
import { sync } from "./sync.js";
|
|
16
|
-
const SLUG = "onepass-gates";
|
|
17
|
-
const STOP_AFTER_PLAN = Symbol("onepass-gates-plan-observed");
|
|
18
|
-
const ORIGINAL_STATE_DIR = process.env.HQ_STATE_DIR;
|
|
19
|
-
const vaultConfig = {
|
|
20
|
-
apiUrl: "https://vault-api.test",
|
|
21
|
-
authToken: "onepass-test-token",
|
|
22
|
-
region: "us-east-1",
|
|
23
|
-
companyVaultUsesPresign: true,
|
|
24
|
-
};
|
|
25
|
-
let baseDir;
|
|
26
|
-
let hqRoot;
|
|
27
|
-
let companyRoot;
|
|
28
|
-
function row(key, size = 1) {
|
|
29
|
-
return { key, size, lastModified: new Date("2026-09-14T00:00:00Z"), etag: `"etag-${key}"` };
|
|
30
|
-
}
|
|
31
|
-
function pagedListing(rows, pageSize, beforePage) {
|
|
32
|
-
let pass = 0;
|
|
33
|
-
const pages = [];
|
|
34
|
-
const forbidden = async () => {
|
|
35
|
-
throw new Error("planner gate reached a transfer instead of stopping at plan");
|
|
36
|
-
};
|
|
37
|
-
const listObjects = vi.fn(async (input) => {
|
|
38
|
-
expect(input.prefix).toBeUndefined();
|
|
39
|
-
if (input.continuationToken === undefined)
|
|
40
|
-
pass += 1;
|
|
41
|
-
const start = input.continuationToken === undefined ? 0 : Number(input.continuationToken);
|
|
42
|
-
const end = Math.min(start + pageSize, rows.length);
|
|
43
|
-
const page = { pass, start, keys: rows.slice(start, end).map(({ key }) => key) };
|
|
44
|
-
beforePage?.(page);
|
|
45
|
-
pages.push(page);
|
|
46
|
-
return {
|
|
47
|
-
// Each transport call owns fresh objects; no pass is cached or coalesced.
|
|
48
|
-
objects: rows.slice(start, end).map((object) => ({ ...object })),
|
|
49
|
-
nextContinuationToken: end < rows.length ? String(end) : undefined,
|
|
50
|
-
};
|
|
51
|
-
});
|
|
52
|
-
const io = {
|
|
53
|
-
listObjects,
|
|
54
|
-
putObject: forbidden,
|
|
55
|
-
getObject: forbidden,
|
|
56
|
-
deleteObject: forbidden,
|
|
57
|
-
headObject: forbidden,
|
|
58
|
-
};
|
|
59
|
-
return { io, listObjects, pages, passCount: () => pass };
|
|
60
|
-
}
|
|
61
|
-
async function planWith(listing) {
|
|
62
|
-
setObjectIOFactory(() => listing.io);
|
|
63
|
-
let plan;
|
|
64
|
-
try {
|
|
65
|
-
await sync({
|
|
66
|
-
company: SLUG,
|
|
67
|
-
vaultConfig,
|
|
68
|
-
hqRoot,
|
|
69
|
-
syncMode: "all",
|
|
70
|
-
propagateDeletePolicy: "owned-only",
|
|
71
|
-
fileTombstones: new Map(),
|
|
72
|
-
skipReindex: true,
|
|
73
|
-
operationLockAlreadyHeld: true,
|
|
74
|
-
onEvent: (event) => {
|
|
75
|
-
if (event.type !== "plan")
|
|
76
|
-
return;
|
|
77
|
-
plan = event;
|
|
78
|
-
throw STOP_AFTER_PLAN;
|
|
79
|
-
},
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
catch (error) {
|
|
83
|
-
if (error !== STOP_AFTER_PLAN)
|
|
84
|
-
throw error;
|
|
85
|
-
}
|
|
86
|
-
expect(plan, "sync must reach the real, completed pull plan").toBeDefined();
|
|
87
|
-
return plan;
|
|
88
|
-
}
|
|
89
|
-
function seed(files = {}) {
|
|
90
|
-
writeJournal(SLUG, { version: "2", lastSync: "seed", pulls: [], files });
|
|
91
|
-
}
|
|
92
|
-
function knownEntry(key) {
|
|
93
|
-
return {
|
|
94
|
-
hash: "a".repeat(64),
|
|
95
|
-
size: 11,
|
|
96
|
-
syncedAt: "2026-09-14T00:00:00Z",
|
|
97
|
-
direction: "up",
|
|
98
|
-
remoteEtag: `etag-${key}`,
|
|
99
|
-
kind: "file",
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
function commitDeleteIntent(key) {
|
|
103
|
-
const journal = readJournal(SLUG);
|
|
104
|
-
const entry = journal.files[key];
|
|
105
|
-
journal.files[key] = {
|
|
106
|
-
...entry,
|
|
107
|
-
localDeleteIntent: {
|
|
108
|
-
version: 1,
|
|
109
|
-
remoteEtag: entry.remoteEtag,
|
|
110
|
-
localHash: entry.hash,
|
|
111
|
-
localKind: "file",
|
|
112
|
-
},
|
|
113
|
-
};
|
|
114
|
-
writeJournal(SLUG, journal);
|
|
115
|
-
}
|
|
116
|
-
beforeEach(() => {
|
|
117
|
-
baseDir = fs.mkdtempSync(path.join(os.tmpdir(), "hq-onepass-gates-"));
|
|
118
|
-
hqRoot = path.join(baseDir, "hq");
|
|
119
|
-
companyRoot = path.join(hqRoot, "companies", SLUG);
|
|
120
|
-
fs.mkdirSync(companyRoot, { recursive: true });
|
|
121
|
-
process.env.HQ_STATE_DIR = path.join(baseDir, "state");
|
|
122
|
-
fs.mkdirSync(process.env.HQ_STATE_DIR, { recursive: true });
|
|
123
|
-
clearContextCache();
|
|
124
|
-
releaseCachedAreaJournalMigrations();
|
|
125
|
-
vi.stubGlobal("fetch", async (url) => {
|
|
126
|
-
const target = String(url);
|
|
127
|
-
if (target.includes("/entity/check-slug/me")) {
|
|
128
|
-
return { ok: true, status: 200, json: async () => ({ available: false, conflictingCompanyUid: "cmp_onepass_gates" }), text: async () => "" };
|
|
129
|
-
}
|
|
130
|
-
if (target.includes("/entity/by-slug/") || target.includes("/entity/cmp_")) {
|
|
131
|
-
return {
|
|
132
|
-
ok: true, status: 200,
|
|
133
|
-
json: async () => ({ entity: { uid: "cmp_onepass_gates", slug: SLUG, bucketName: "hq-vault-onepass-gates", status: "active" } }),
|
|
134
|
-
text: async () => "",
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
throw new Error(`unexpected planner fixture request: ${target}`);
|
|
138
|
-
});
|
|
139
|
-
seed();
|
|
140
|
-
});
|
|
141
|
-
afterEach(() => {
|
|
142
|
-
setObjectIOFactory(null);
|
|
143
|
-
clearContextCache();
|
|
144
|
-
releaseCachedAreaJournalMigrations();
|
|
145
|
-
vi.restoreAllMocks();
|
|
146
|
-
vi.unstubAllGlobals();
|
|
147
|
-
if (ORIGINAL_STATE_DIR === undefined)
|
|
148
|
-
delete process.env.HQ_STATE_DIR;
|
|
149
|
-
else
|
|
150
|
-
process.env.HQ_STATE_DIR = ORIGINAL_STATE_DIR;
|
|
151
|
-
fs.rmSync(baseDir, { recursive: true, force: true });
|
|
152
|
-
});
|
|
153
|
-
describe("one-pass all-mode pull planner gates", () => {
|
|
154
|
-
it("fetches exactly one paged LIST for a complete all-mode plan", async () => {
|
|
155
|
-
const rowCount = 5;
|
|
156
|
-
const pageSize = 2;
|
|
157
|
-
const singlePassPages = Math.ceil(rowCount / pageSize);
|
|
158
|
-
const listing = pagedListing(Array.from({ length: rowCount }, (_, i) => row(`docs/row-${i}.md`)), pageSize);
|
|
159
|
-
// Positive control: use the SAME transport and counters on a known page.
|
|
160
|
-
const control = await listing.io.listObjects({});
|
|
161
|
-
expect(control.objects.map(({ key }) => key)).toEqual(["docs/row-0.md", "docs/row-1.md"]);
|
|
162
|
-
expect(listing.listObjects).toHaveBeenCalledTimes(1);
|
|
163
|
-
expect(listing.pages).toHaveLength(1);
|
|
164
|
-
listing.listObjects.mockClear();
|
|
165
|
-
listing.pages.length = 0;
|
|
166
|
-
const plan = await planWith(listing);
|
|
167
|
-
expect(plan.filesToDownload).toBe(rowCount);
|
|
168
|
-
// Check every page and the partial tail, not only the counter's wiring.
|
|
169
|
-
expect(listing.pages.slice(0, singlePassPages).map(({ start, keys }) => ({ start, keys }))).toEqual([
|
|
170
|
-
{ start: 0, keys: ["docs/row-0.md", "docs/row-1.md"] },
|
|
171
|
-
{ start: 2, keys: ["docs/row-2.md", "docs/row-3.md"] },
|
|
172
|
-
{ start: 4, keys: ["docs/row-4.md"] },
|
|
173
|
-
]);
|
|
174
|
-
expect.soft(listing.listObjects.mock.calls.length, "listObjects invocations must equal one complete paged pass").toBe(singlePassPages);
|
|
175
|
-
expect.soft(listing.pages.length, "pages fetched must equal one complete paged pass").toBe(singlePassPages);
|
|
176
|
-
});
|
|
177
|
-
it("honors a watcher delete committed during the LAST LIST feeding classification", async () => {
|
|
178
|
-
const victim = "docs/deleted-during-list.md";
|
|
179
|
-
const control = "docs/download-control.md";
|
|
180
|
-
const rows = [row(control, 7), row(victim, 11)];
|
|
181
|
-
const journalReads = vi.spyOn(journalModule, "readJournalForPass");
|
|
182
|
-
seed({ [victim]: knownEntry(victim) });
|
|
183
|
-
// Calibrate against a real plan, not an assumed implementation pass count.
|
|
184
|
-
// This also keeps the regression meaningful once production uses one pass.
|
|
185
|
-
// Positive control: absent WITHOUT intent, the very same victim downloads.
|
|
186
|
-
const baselineListing = pagedListing(rows, 1);
|
|
187
|
-
const baseline = await planWith(baselineListing);
|
|
188
|
-
expect(baseline.filesToDownload).toBe(2);
|
|
189
|
-
expect(baseline.bytesToDownload).toBe(18);
|
|
190
|
-
const lastPass = baselineListing.passCount();
|
|
191
|
-
expect(lastPass).toBeGreaterThan(0);
|
|
192
|
-
// A precommitted intent is a fixture/control check for the strict policy:
|
|
193
|
-
// the victim becomes a local-delete tombstone and only the 7-byte control
|
|
194
|
-
// downloads. Observe the real journal projection without replacing it.
|
|
195
|
-
commitDeleteIntent(victim);
|
|
196
|
-
const controlPlan = await planWith(pagedListing(rows, 1));
|
|
197
|
-
expect(controlPlan.filesToDownload).toBe(1);
|
|
198
|
-
expect(controlPlan.bytesToDownload).toBe(7);
|
|
199
|
-
const intentionalKeys = () => journalReads.mock.results.flatMap((result) => result.type === "return"
|
|
200
|
-
? Object.entries(result.value.files)
|
|
201
|
-
.filter(([, entry]) => entry.removedReason === "local-delete").map(([key]) => key)
|
|
202
|
-
: []);
|
|
203
|
-
expect(intentionalKeys()).toContain(victim);
|
|
204
|
-
seed({ [victim]: knownEntry(victim) });
|
|
205
|
-
journalReads.mockClear();
|
|
206
|
-
fs.mkdirSync(path.dirname(path.join(companyRoot, victim)), { recursive: true });
|
|
207
|
-
fs.writeFileSync(path.join(companyRoot, victim), "local bytes");
|
|
208
|
-
const commits = [];
|
|
209
|
-
const listing = pagedListing(rows, 1, (page) => {
|
|
210
|
-
if (page.pass !== lastPass || !page.keys.includes(victim))
|
|
211
|
-
return;
|
|
212
|
-
// On 481138a this lands in PASS TWO, after the freshness reload, just
|
|
213
|
-
// before its victim page returns to classification: the dangerous LIST.
|
|
214
|
-
// Pass one is independently served and never commits this intent.
|
|
215
|
-
// A one-pass rewrite instead injects on its sole (last) pass.
|
|
216
|
-
fs.unlinkSync(path.join(companyRoot, victim));
|
|
217
|
-
commitDeleteIntent(victim);
|
|
218
|
-
commits.push(page);
|
|
219
|
-
});
|
|
220
|
-
const plan = await planWith(listing);
|
|
221
|
-
expect(commits).toEqual([{ pass: lastPass, start: 1, keys: [victim] }]);
|
|
222
|
-
expect(listing.passCount()).toBe(lastPass);
|
|
223
|
-
expect(readJournal(SLUG).files[victim]?.localDeleteIntent).toEqual({
|
|
224
|
-
version: 1, remoteEtag: `etag-${victim}`, localHash: "a".repeat(64), localKind: "file",
|
|
225
|
-
});
|
|
226
|
-
expect(listing.pages.filter(({ pass }) => pass === lastPass).map(({ keys }) => keys)).toEqual([[control], [victim]]);
|
|
227
|
-
// Same probes as the positive controls above: suppress the victim's
|
|
228
|
-
// download, retain the known download, and classify intentional absence.
|
|
229
|
-
expect.soft(plan.filesToDownload, "only the positive-control file should download").toBe(1);
|
|
230
|
-
expect.soft(plan.bytesToDownload, "the deleted victim's 11 bytes must not be scheduled").toBe(7);
|
|
231
|
-
expect.soft(intentionalKeys(), "the plan must classify the victim as an intentional local delete").toContain(victim);
|
|
232
|
-
});
|
|
233
|
-
it("preserves skip-overlay-marker-with-children when the marker precedes its children (feedback_d2082110)", async () => {
|
|
234
|
-
const marker = "docs/overlay";
|
|
235
|
-
const child = `${marker}/child.md`;
|
|
236
|
-
const collision = "docs/genuine-collision";
|
|
237
|
-
fs.mkdirSync(path.join(companyRoot, marker), { recursive: true });
|
|
238
|
-
fs.mkdirSync(path.join(companyRoot, collision), { recursive: true });
|
|
239
|
-
const preserved = path.join(companyRoot, marker, "materialized.md");
|
|
240
|
-
fs.writeFileSync(preserved, "keep this local content");
|
|
241
|
-
const errors = vi.spyOn(console, "error").mockImplementation(() => { });
|
|
242
|
-
// Deliberately marker FIRST, child on a LATER PAGE. Children-first would
|
|
243
|
-
// hide the exact lookahead requirement the one-pass design must preserve.
|
|
244
|
-
const listing = pagedListing([row(marker, 30), row(child, 18), row(collision, 40)], 1);
|
|
245
|
-
const plan = await planWith(listing);
|
|
246
|
-
for (let pass = 1; pass <= listing.passCount(); pass += 1) {
|
|
247
|
-
expect(listing.pages.filter((page) => page.pass === pass).map(({ keys }) => keys)).toEqual([[marker], [child], [collision]]);
|
|
248
|
-
}
|
|
249
|
-
expect(plan.filesToDownload).toBe(1);
|
|
250
|
-
expect(plan.bytesToDownload).toBe(18);
|
|
251
|
-
expect(plan.filesToSkip).toBe(2);
|
|
252
|
-
const messagesFor = (key) => errors.mock.calls.map((args) => args.join(" ")).filter((message) => message.includes(`${key} `)).join("\n");
|
|
253
|
-
// Ordinary streaming skips are compacted out of plan.items. Assert the
|
|
254
|
-
// public diagnostic unique to skip-overlay-marker-with-children plus its
|
|
255
|
-
// skip count, rather than exporting/changing the production planner.
|
|
256
|
-
expect(messagesFor(marker)).toContain("is a directory-overlay marker whose contents already exist locally as a directory; keeping the local directory and ignoring the marker (no action needed)");
|
|
257
|
-
// Positive control for BOTH absence probes: a genuine collision in this
|
|
258
|
-
// same plan must produce the exact destructive/manual advice we detect.
|
|
259
|
-
expect(messagesFor(collision)).toContain("rm -rf the local directory to pull");
|
|
260
|
-
expect(messagesFor(collision)).toContain("manual reconciliation required");
|
|
261
|
-
expect(messagesFor(marker)).not.toContain("rm -rf the local directory to pull");
|
|
262
|
-
expect(messagesFor(marker)).not.toContain("manual reconciliation required");
|
|
263
|
-
expect(fs.readFileSync(preserved, "utf8")).toBe("keep this local content");
|
|
264
|
-
});
|
|
265
|
-
});
|
|
266
|
-
//# sourceMappingURL=onepass-pull-planner.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onepass-pull-planner.test.js","sourceRoot":"","sources":["../../src/cli/onepass-pull-planner.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AA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-memory gate for an all-mode pull at the list -> plan boundary.
|
|
3
|
-
*
|
|
4
|
-
* `sync()` receives every remote object through `listRemoteFilesForScope()`;
|
|
5
|
-
* all mode deliberately invokes the broad `listRemoteFiles()` branch. This
|
|
6
|
-
* fixture reaches that production seam with a paged ObjectIO transport, then
|
|
7
|
-
* stops at the emitted plan before transfer/execution can own unrelated data.
|
|
8
|
-
*
|
|
9
|
-
* The fixture is 50,000 long-path rows rather than the largest 677,732-row
|
|
10
|
-
* personal vault. It matches the steady-state phase-two retention harness's
|
|
11
|
-
* practical full-pass cardinality, makes three independent trials CI-sized,
|
|
12
|
-
* and keeps the bound per-row so the production scope remains constrained.
|
|
13
|
-
*/
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=streaming-pull-planner.bench.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"streaming-pull-planner.bench.test.d.ts","sourceRoot":"","sources":["../../src/cli/streaming-pull-planner.bench.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
|
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resident-memory gate for an all-mode pull at the list -> plan boundary.
|
|
3
|
-
*
|
|
4
|
-
* `sync()` receives every remote object through `listRemoteFilesForScope()`;
|
|
5
|
-
* all mode deliberately invokes the broad `listRemoteFiles()` branch. This
|
|
6
|
-
* fixture reaches that production seam with a paged ObjectIO transport, then
|
|
7
|
-
* stops at the emitted plan before transfer/execution can own unrelated data.
|
|
8
|
-
*
|
|
9
|
-
* The fixture is 50,000 long-path rows rather than the largest 677,732-row
|
|
10
|
-
* personal vault. It matches the steady-state phase-two retention harness's
|
|
11
|
-
* practical full-pass cardinality, makes three independent trials CI-sized,
|
|
12
|
-
* and keeps the bound per-row so the production scope remains constrained.
|
|
13
|
-
*/
|
|
14
|
-
import * as fs from "node:fs";
|
|
15
|
-
import * as os from "node:os";
|
|
16
|
-
import * as path from "node:path";
|
|
17
|
-
import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
|
|
18
|
-
import { clearContextCache } from "../context.js";
|
|
19
|
-
import { closeCachedAreaJournalMigration, openJournalStateStoreForMigration, releaseCachedAreaJournalMigrations, writeJournal, } from "../journal.js";
|
|
20
|
-
import { acquireGc, collectGarbage, usedBytes } from "../journal-snapshot-memory-helpers.js";
|
|
21
|
-
import { setObjectIOFactory, } from "../object-io.js";
|
|
22
|
-
import { AreaLedgerMigration } from "../sync/area-ledger-migration.js";
|
|
23
|
-
import { AreaResolver } from "../sync/area-resolver.js";
|
|
24
|
-
import { sync } from "./sync.js";
|
|
25
|
-
const ROW_COUNT = 50_000;
|
|
26
|
-
const PAGE_SIZE = 1_000;
|
|
27
|
-
const TRIALS = 3;
|
|
28
|
-
const CONTROL_BYTES = 16 * 1024 * 1024;
|
|
29
|
-
// The current released phase-two store retains 117.73 B/row. A streaming
|
|
30
|
-
// planner should need no more than two similarly compact per-key structures:
|
|
31
|
-
// a canonical presence marker for delete detection and a decision marker for
|
|
32
|
-
// an actionable item. 2 * 117.73 rounds up to 236 B/row. The fixed 3 MiB
|
|
33
|
-
// covers one 1,000-object page (~0.37 MiB at the measured old shape) plus
|
|
34
|
-
// table capacity and one pass's non-row bookkeeping. The journal itself is
|
|
35
|
-
// deliberately in the pre-measurement baseline.
|
|
36
|
-
const MAX_LIVE_BOUNDARY_BYTES_PER_ROW = 236;
|
|
37
|
-
const MAX_FIXED_LIVE_BOUNDARY_BYTES = 3 * 1024 * 1024;
|
|
38
|
-
const MAX_LIVE_BOUNDARY_BYTES = MAX_FIXED_LIVE_BOUNDARY_BYTES + ROW_COUNT * MAX_LIVE_BOUNDARY_BYTES_PER_ROW;
|
|
39
|
-
const EMPTY_FILE_SHA256 = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
|
|
40
|
-
const STOP_AFTER_PLAN = Symbol("streaming-pull-planner-boundary");
|
|
41
|
-
const ORIGINAL_STATE_DIR = process.env.HQ_STATE_DIR;
|
|
42
|
-
const layout = {
|
|
43
|
-
format: 1,
|
|
44
|
-
routerVersion: 1,
|
|
45
|
-
areas: [
|
|
46
|
-
{ id: "root:docs", prefixes: ["docs"], paths: [] },
|
|
47
|
-
{ id: "root:@files", prefixes: [], paths: [], rootFiles: true },
|
|
48
|
-
],
|
|
49
|
-
};
|
|
50
|
-
const vaultConfig = {
|
|
51
|
-
apiUrl: "https://vault-api.test",
|
|
52
|
-
authToken: "streaming-pull-planner-test-token",
|
|
53
|
-
region: "us-east-1",
|
|
54
|
-
companyVaultUsesPresign: true,
|
|
55
|
-
};
|
|
56
|
-
let baseDir = "";
|
|
57
|
-
let hqRoot = "";
|
|
58
|
-
let stateDir = "";
|
|
59
|
-
let collect;
|
|
60
|
-
function fixtureKey(index) {
|
|
61
|
-
const token = index.toString(36).padStart(8, "0");
|
|
62
|
-
return `docs/directory-${index % 400}/nested-${index % 37}/entry-${token.repeat(15)}.md`;
|
|
63
|
-
}
|
|
64
|
-
function remoteEtag(index) {
|
|
65
|
-
return `streaming-boundary-${index.toString(16).padStart(8, "0")}`;
|
|
66
|
-
}
|
|
67
|
-
function pagedObjectIO() {
|
|
68
|
-
return {
|
|
69
|
-
putObject: async () => ({ etag: "unused" }),
|
|
70
|
-
getObject: async () => {
|
|
71
|
-
throw new Error("all-mode boundary fixture must stop before download");
|
|
72
|
-
},
|
|
73
|
-
deleteObject: async () => {
|
|
74
|
-
throw new Error("all-mode boundary fixture must stop before delete");
|
|
75
|
-
},
|
|
76
|
-
headObject: async () => {
|
|
77
|
-
throw new Error("all-mode boundary fixture must stop before HEAD");
|
|
78
|
-
},
|
|
79
|
-
listObjects: async (input) => {
|
|
80
|
-
expect(input.prefix).toBeUndefined();
|
|
81
|
-
const start = input.continuationToken === undefined ? 0 : Number(input.continuationToken);
|
|
82
|
-
const end = Math.min(start + PAGE_SIZE, ROW_COUNT);
|
|
83
|
-
const objects = [];
|
|
84
|
-
for (let index = start; index < end; index += 1) {
|
|
85
|
-
objects.push({
|
|
86
|
-
key: fixtureKey(index),
|
|
87
|
-
size: 0,
|
|
88
|
-
lastModified: new Date(1_700_000_000_000 + index),
|
|
89
|
-
etag: remoteEtag(index),
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
return {
|
|
93
|
-
objects,
|
|
94
|
-
nextContinuationToken: end < ROW_COUNT ? String(end) : undefined,
|
|
95
|
-
};
|
|
96
|
-
},
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
function seedAreaAuthoritativeJournal() {
|
|
100
|
-
const slug = "streaming-boundary";
|
|
101
|
-
const companyRoot = path.join(hqRoot, "companies", slug);
|
|
102
|
-
const files = {};
|
|
103
|
-
for (let index = 0; index < ROW_COUNT; index += 1) {
|
|
104
|
-
const key = fixtureKey(index);
|
|
105
|
-
const localPath = path.join(companyRoot, key);
|
|
106
|
-
fs.mkdirSync(path.dirname(localPath), { recursive: true });
|
|
107
|
-
fs.writeFileSync(localPath, "");
|
|
108
|
-
const stats = fs.lstatSync(localPath);
|
|
109
|
-
files[key] = {
|
|
110
|
-
hash: EMPTY_FILE_SHA256,
|
|
111
|
-
size: 0,
|
|
112
|
-
syncedAt: "2026-09-15T00:00:00.000Z",
|
|
113
|
-
direction: "down",
|
|
114
|
-
kind: "file",
|
|
115
|
-
remoteEtag: remoteEtag(index),
|
|
116
|
-
mtimeMs: Math.floor(stats.mtimeMs),
|
|
117
|
-
ctimeMs: Math.floor(stats.ctimeMs),
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
writeJournal(slug, { version: "2", lastSync: "seed", files, pulls: [] });
|
|
121
|
-
const migration = new AreaLedgerMigration({
|
|
122
|
-
rootDir: stateDir,
|
|
123
|
-
journalSlug: slug,
|
|
124
|
-
resolver: new AreaResolver(layout),
|
|
125
|
-
legacyStore: openJournalStateStoreForMigration(slug),
|
|
126
|
-
maxRecordBytes: 32 * 1024 * 1024,
|
|
127
|
-
maxRowsPerRecord: ROW_COUNT,
|
|
128
|
-
});
|
|
129
|
-
migration.copyAndCatchUp();
|
|
130
|
-
expect(migration.cutOver(Number.POSITIVE_INFINITY).phase).toBe("area-authoritative");
|
|
131
|
-
migration.dispose();
|
|
132
|
-
}
|
|
133
|
-
async function runThroughAllModePlan(onPlan) {
|
|
134
|
-
try {
|
|
135
|
-
await sync({
|
|
136
|
-
company: "streaming-boundary",
|
|
137
|
-
vaultConfig,
|
|
138
|
-
hqRoot,
|
|
139
|
-
fileTombstones: new Map(),
|
|
140
|
-
skipReindex: true,
|
|
141
|
-
operationLockAlreadyHeld: true,
|
|
142
|
-
onEvent: (event) => {
|
|
143
|
-
if (event.type !== "plan")
|
|
144
|
-
return;
|
|
145
|
-
onPlan(event);
|
|
146
|
-
throw STOP_AFTER_PLAN;
|
|
147
|
-
},
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
catch (error) {
|
|
151
|
-
if (error === STOP_AFTER_PLAN)
|
|
152
|
-
return;
|
|
153
|
-
throw error;
|
|
154
|
-
}
|
|
155
|
-
throw new Error("all-mode boundary fixture reached an executor instead of stopping at plan");
|
|
156
|
-
}
|
|
157
|
-
async function warmAllModePlan() {
|
|
158
|
-
let filesToSkip;
|
|
159
|
-
await runThroughAllModePlan((event) => {
|
|
160
|
-
filesToSkip = event.filesToSkip;
|
|
161
|
-
});
|
|
162
|
-
expect(filesToSkip).toBe(ROW_COUNT);
|
|
163
|
-
}
|
|
164
|
-
async function measureLiveBoundary() {
|
|
165
|
-
collectGarbage(collect);
|
|
166
|
-
const baselineBytes = usedBytes();
|
|
167
|
-
let boundaryBytes;
|
|
168
|
-
let planFilesToSkip;
|
|
169
|
-
await runThroughAllModePlan((event) => {
|
|
170
|
-
planFilesToSkip = event.filesToSkip;
|
|
171
|
-
// This event is emitted while both the all-mode RemoteFile[] and PullPlan
|
|
172
|
-
// are still live in syncWithOperationLockHeld's stack frame.
|
|
173
|
-
collectGarbage(collect);
|
|
174
|
-
boundaryBytes = usedBytes();
|
|
175
|
-
});
|
|
176
|
-
if (boundaryBytes === undefined || planFilesToSkip === undefined) {
|
|
177
|
-
throw new Error("all-mode boundary fixture did not observe the pull plan");
|
|
178
|
-
}
|
|
179
|
-
return {
|
|
180
|
-
baselineBytes,
|
|
181
|
-
liveBytes: boundaryBytes - baselineBytes,
|
|
182
|
-
planFilesToSkip,
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
function measureAllocationControl() {
|
|
186
|
-
collectGarbage(collect);
|
|
187
|
-
const baselineBytes = usedBytes();
|
|
188
|
-
let control = Buffer.alloc(CONTROL_BYTES, 0x5a);
|
|
189
|
-
expect(control[0]).toBe(0x5a);
|
|
190
|
-
const detectedBytes = usedBytes() - baselineBytes;
|
|
191
|
-
control = undefined;
|
|
192
|
-
collectGarbage(collect);
|
|
193
|
-
return detectedBytes;
|
|
194
|
-
}
|
|
195
|
-
describe("all-mode list to plan resident boundary", () => {
|
|
196
|
-
beforeAll(async () => {
|
|
197
|
-
baseDir = fs.mkdtempSync(path.join(os.tmpdir(), "hq-streaming-pull-planner-"));
|
|
198
|
-
hqRoot = path.join(baseDir, "hq");
|
|
199
|
-
stateDir = path.join(baseDir, "state");
|
|
200
|
-
fs.mkdirSync(stateDir, { recursive: true });
|
|
201
|
-
process.env.HQ_STATE_DIR = stateDir;
|
|
202
|
-
clearContextCache();
|
|
203
|
-
releaseCachedAreaJournalMigrations();
|
|
204
|
-
vi.stubGlobal("fetch", async (url) => {
|
|
205
|
-
const target = String(url);
|
|
206
|
-
if (target.includes("/entity/check-slug/me")) {
|
|
207
|
-
return {
|
|
208
|
-
ok: true,
|
|
209
|
-
status: 200,
|
|
210
|
-
json: async () => ({ available: false, conflictingCompanyUid: "cmp_streaming_boundary" }),
|
|
211
|
-
text: async () => "",
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
if (target.includes("/entity/by-slug/") || target.includes("/entity/cmp_")) {
|
|
215
|
-
return {
|
|
216
|
-
ok: true,
|
|
217
|
-
status: 200,
|
|
218
|
-
json: async () => ({
|
|
219
|
-
entity: {
|
|
220
|
-
uid: "cmp_streaming_boundary",
|
|
221
|
-
slug: "streaming-boundary",
|
|
222
|
-
bucketName: "hq-vault-streaming-boundary",
|
|
223
|
-
status: "active",
|
|
224
|
-
},
|
|
225
|
-
}),
|
|
226
|
-
text: async () => "",
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
return { ok: false, status: 404, json: async () => ({}), text: async () => "not found" };
|
|
230
|
-
});
|
|
231
|
-
setObjectIOFactory(() => pagedObjectIO());
|
|
232
|
-
seedAreaAuthoritativeJournal();
|
|
233
|
-
collect = acquireGc();
|
|
234
|
-
// The first pass opens the cached area migration. The measured passes are
|
|
235
|
-
// the steady state after that one-time work has settled.
|
|
236
|
-
await warmAllModePlan();
|
|
237
|
-
collectGarbage(collect);
|
|
238
|
-
}, 300_000);
|
|
239
|
-
afterAll(() => {
|
|
240
|
-
setObjectIOFactory(null);
|
|
241
|
-
clearContextCache();
|
|
242
|
-
releaseCachedAreaJournalMigrations();
|
|
243
|
-
closeCachedAreaJournalMigration("streaming-boundary");
|
|
244
|
-
vi.unstubAllGlobals();
|
|
245
|
-
if (ORIGINAL_STATE_DIR === undefined)
|
|
246
|
-
delete process.env.HQ_STATE_DIR;
|
|
247
|
-
else
|
|
248
|
-
process.env.HQ_STATE_DIR = ORIGINAL_STATE_DIR;
|
|
249
|
-
fs.rmSync(baseDir, { recursive: true, force: true });
|
|
250
|
-
});
|
|
251
|
-
it(`retains at most ${MAX_LIVE_BOUNDARY_BYTES_PER_ROW} B/row after all-mode list and plan`, async () => {
|
|
252
|
-
const controlBytes = measureAllocationControl();
|
|
253
|
-
expect(controlBytes).toBeGreaterThan(CONTROL_BYTES * 0.9);
|
|
254
|
-
const measurements = [];
|
|
255
|
-
for (let trial = 0; trial < TRIALS; trial += 1) {
|
|
256
|
-
const measurement = await measureLiveBoundary();
|
|
257
|
-
expect(measurement.planFilesToSkip).toBe(ROW_COUNT);
|
|
258
|
-
measurements.push(measurement);
|
|
259
|
-
}
|
|
260
|
-
const liveBytes = measurements.map((measurement) => measurement.liveBytes);
|
|
261
|
-
const minBytes = Math.min(...liveBytes);
|
|
262
|
-
const maxBytes = Math.max(...liveBytes);
|
|
263
|
-
const spreadBytes = maxBytes - minBytes;
|
|
264
|
-
process.stdout.write(`all-mode list->plan resident: rows=${ROW_COUNT}; trials=${liveBytes.join(",")}; ` +
|
|
265
|
-
`min=${minBytes}; max=${maxBytes}; spread=${spreadBytes}; ` +
|
|
266
|
-
`ceiling=${MAX_LIVE_BOUNDARY_BYTES}; control=${controlBytes}\n`);
|
|
267
|
-
// Use the worst of three steady-state trials: a streaming redesign must
|
|
268
|
-
// keep this boundary below the budget on every isolated pass, not merely
|
|
269
|
-
// win one favourable GC sample.
|
|
270
|
-
expect(maxBytes).toBeLessThanOrEqual(MAX_LIVE_BOUNDARY_BYTES);
|
|
271
|
-
}, 300_000);
|
|
272
|
-
});
|
|
273
|
-
//# sourceMappingURL=streaming-pull-planner.bench.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"streaming-pull-planner.bench.test.js","sourceRoot":"","sources":["../../src/cli/streaming-pull-planner.bench.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAEvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EACL,+BAA+B,EAC/B,iCAAiC,EACjC,kCAAkC,EAClC,YAAY,GACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,uCAAuC,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