GitNexus/gitnexus/test/helpers/interrupted-publication-runner.mjs
Gergő Magyar c8629f1b6c
fix(storage): preserve published graph on rebuild failure (#3613)
* fix(storage): preserve published graph on rebuild failure (U1)

* test(storage): strengthen publication review coverage (U1)

* test(storage): align publication evidence (U1)

* fix(storage): retain completed recovery archives

* fix(storage): preserve quarantines before cache reads

* ci: run staged publication benchmark guard

* fix(ci): declare WAL replay probe determinism

Document that the bounded recovery read drains and discards its rows. Only WAL replay success is observed; row identity and query behavior are unchanged. The existing 21 query-determinism checks pass.

* test(storage): cover publication across platforms

* test(ci): exclude POSIX suite from Windows estimates

* test: allow native publication retry to finish

* test: verify Windows incremental recovery

---------

Co-authored-by: Gergo Magyar <gergomagyar0@gmail.com>
2026-10-17 18:45:11 +01:00

22 lines
740 B
JavaScript

// A real analyzer process exits at a JS-visible publication boundary. No parser,
// graph, storage, or checkpoint implementation is replaced.
import fs from 'node:fs/promises';
import path from 'node:path';
const rename = fs.rename;
fs.rename = async (source, destination) => {
if (
path.basename(String(source)).startsWith('lbug.staging.') &&
path.basename(String(destination)) === 'lbug'
) {
process.exit(73);
}
return rename(source, destination);
};
const { runFullAnalysis } = await import('../../dist/core/run-analyze.js');
await runFullAnalysis(
process.argv[2],
{ force: true, skipNativeCloseOnExit: true },
{ onProgress() {} },
);
throw new Error('Expected interruption immediately before publication');