Complete V1 RC deployment capability gates

This commit is contained in:
mes123456
2026-08-15 01:01:23 -04:00
parent a3f3071c03
commit 17ab961485
37 changed files with 2031 additions and 184 deletions

View File

@@ -54,6 +54,7 @@ test("meets the Chromium OPFS Simulation cache playback performance gate", async
const saved = await writer.saveProject(projectId, 1, sourceBlend.slice(0));
const stored = await writer.putSimulationCache(projectId, manifest, payload);
writer.terminate();
const writerPendingAfterTerminate = writer.getPendingRequestCount();
const storedAt = performance.now();
const reader = new StorageClient();
@@ -87,6 +88,11 @@ test("meets the Chromium OPFS Simulation cache playback performance gate", async
const playbackResult = await playback.play();
const finished = performance.now();
reader.terminate();
const readerPendingAfterTerminate = reader.getPendingRequestCount();
const recovery = new StorageClient();
const recovered = await recovery.readSimulationCacheFrame(projectId, stored.cacheKey, frameCount);
recovery.terminate();
const recoveryPendingAfterTerminate = recovery.getPendingRequestCount();
return {
backend: saved.backend,
frameCount,
@@ -99,12 +105,18 @@ test("meets the Chromium OPFS Simulation cache playback performance gate", async
storeMs: Math.round(storedAt - started),
playbackMs: Math.round(finished - storedAt),
elapsedMs: Math.round(finished - started),
peakCacheBytes: manifest.byteLength,
pendingRequestsAfterTerminate: writerPendingAfterTerminate + readerPendingAfterTerminate + recoveryPendingAfterTerminate,
workerRestartRecovered: recovered.data.byteLength === frameBytes,
};
});
console.log("simulation-cache-performance", JSON.stringify(result));
expect(result.backend).toBe("opfs");
expect(result).toMatchObject({ frameCount: 600, byteLength: 52_800, status: "COMPLETED", appliedFrames: 600, lastFrame: 600, publishedFrames: 600 });
expect(result.lastTranslation).toBeCloseTo(60, 5);
expect(result.storeMs).toBeLessThan(30_000);
expect(result.playbackMs).toBeLessThan(30_000);
expect(result.elapsedMs).toBeLessThan(30_000);
expect(result.pendingRequestsAfterTerminate).toBe(0);
expect(result.workerRestartRecovered).toBe(true);
});