Files
Dune/tools/restore-seats.ts
Quintine 6e26ba5daa Add repeatable verification and establish fresh save checkpoint
Consolidate current readiness and existing rule decisions, preserve selective
subagents and automatic verified Git pushes, and record the efficiency pilot.
Add source-bound compact checks, private saved-game snapshots/online backups,
and bounded HTTP seat-restoration checks with 15 meaningful regressions.

At the user's explicit request, archive and clear 3,644 old local rooms and
related records while retaining schema/migrations; preserve future games from
a fresh empty baseline. Private backups and credentials are outside Git.

Validation: npm run check passes types, lint and all 4,177 offline tests.
Full report: 20260913-efficiency-check-3, 130.147 seconds; source fingerprint
344ce1d44475b0cd4ff10a915f28331cb4e2fcacbc7595636fbaa645c0568f64.
Two earlier broad attempts stopped at new type/lint errors before tests;
both were fixed. Independent review found cancellation falsely passing;
SIGINT/SIGTERM regressions and review confirm the fix. Documentation links,
example test selection, private backup integrity and empty baseline verified.
No app/build/dependency/HTTP implementation changed; no production build,
HTTP suite, browser acceptance or AI calibration claimed for this checkpoint.
The full game goal and existing release gates remain unfinished.
2026-09-13 10:39:34 +10:00

31 lines
1.0 KiB
TypeScript

import { fileURLToPath } from 'node:url';
import { parseArgs } from 'node:util';
import {
checkSeatRestoration,
loadRestorationConfig,
} from './seat-restoration';
async function main() {
const { values } = parseArgs({
options: { config: { type: 'string' }, help: { type: 'boolean' } },
});
if (values.help) {
console.log(
'Usage: node --import tsx tools/restore-seats.ts --config /private/qa-seats.json\nRequires a private manifest outside the checkout and isolated, stable human QA rooms on a loopback server. GET can resume automatic game work. This checks HTTP restoration, not browser rendering.',
);
return;
}
if (!values.config) throw new Error();
const config = loadRestorationConfig(
values.config,
fileURLToPath(new URL('../', import.meta.url)),
);
console.log(JSON.stringify(await checkSeatRestoration(config)));
}
main().catch(() => {
console.error(
'Private-seat restoration failed. Check the private manifest, stable QA versions and local server; see --help.',
);
process.exitCode = 1;
});