fix(ci): await async doctor compaction in the sqlite reliability runner

runDoctorStateSqliteCompact became async in #106210 but this caller
still read fields off the Promise, breaking check-test-types and the
bench-sqlite-reliability tooling test on main.
This commit is contained in:
Peter Steinberger
2026-07-13 03:51:25 -07:00
parent 572b4c7146
commit 624977ec90
+6 -3
View File
@@ -348,9 +348,12 @@ function assertCompactionProof(proof: {
};
}
function compactTargetDatabase(target: TargetDatabase, env: NodeJS.ProcessEnv): CompactionProof {
async function compactTargetDatabase(
target: TargetDatabase,
env: NodeJS.ProcessEnv,
): Promise<CompactionProof> {
if (target.identity.role === "global") {
const report = runDoctorStateSqliteCompact({ env });
const report = await runDoctorStateSqliteCompact({ env });
if (report.skipped) {
throw new Error(`global compaction unexpectedly skipped ${target.path}`);
}
@@ -406,7 +409,7 @@ async function runMaintenanceRoundTrip(params: {
rowsPerBatch: params.rowsPerBatch,
uncommittedBatch: null,
});
const compaction = compactTargetDatabase(params.target, params.env);
const compaction = await compactTargetDatabase(params.target, params.env);
verifyRestoredDatabase({
expectedState,
identity: params.target.identity,