Revert "Merge pull request 'Complete Housekeeping migration and /ase cutover' (#52) from codex/housekeeping-complete into main"
This reverts commit488b6e57c4, reversing changes made tob506b4499a.
This commit is contained in:
1 parent
488b6e57c4
commit
b1ddda66ff
802 files changed
+61370
-76659
No files matched your search
@@ -1,51 +1,18 @@
|
||||
import { spawnSync } from "node:child_process";
|
||||
import { resolve } from "node:path";
|
||||
import {
|
||||
discoverLegacyPages,
|
||||
recordedLegacyPages,
|
||||
} from "../src/features/housekeeping/migration/discover-legacy-pages";
|
||||
import { discoverLegacyPages } from "../src/features/housekeeping/migration/discover-legacy-pages";
|
||||
import { HOUSEKEEPING_MIGRATION_MATRIX } from "../src/features/housekeeping/migration/matrix";
|
||||
import { validateMigrationEntries } from "../src/features/housekeeping/migration/validate-matrix";
|
||||
|
||||
const discovered = discoverLegacyPages();
|
||||
const recorded = recordedLegacyPages(HOUSEKEEPING_MIGRATION_MATRIX);
|
||||
const issues = validateMigrationEntries(
|
||||
recorded,
|
||||
discovered,
|
||||
HOUSEKEEPING_MIGRATION_MATRIX,
|
||||
);
|
||||
if (discovered.length > 0) {
|
||||
issues.push(
|
||||
`legacy UI routes remain after cutover: ${discovered.map((page) => page.legacyPath).join(", ")}`,
|
||||
);
|
||||
}
|
||||
|
||||
const parityTest = spawnSync(
|
||||
process.execPath,
|
||||
[
|
||||
resolve(process.cwd(), "node_modules/vitest/vitest.mjs"),
|
||||
"run",
|
||||
"--coverage.enabled=false",
|
||||
"src/features/housekeeping/cutover/parity.test.ts",
|
||||
],
|
||||
{ cwd: process.cwd(), encoding: "utf8" },
|
||||
);
|
||||
const parityPassed = parityTest.status === 0;
|
||||
|
||||
if (issues.length > 0 || !parityPassed) {
|
||||
if (issues.length > 0) {
|
||||
for (const issue of issues) console.error(issue);
|
||||
if (!parityPassed) {
|
||||
process.stderr.write(parityTest.stdout);
|
||||
process.stderr.write(parityTest.stderr);
|
||||
}
|
||||
process.exitCode = 1;
|
||||
} else {
|
||||
console.log(
|
||||
`Housekeeping migration matrix: ${HOUSEKEEPING_MIGRATION_MATRIX.length}/${recorded.length} historical rows valid; legacy UI pages present=${discovered.length}`,
|
||||
);
|
||||
const removed = HOUSEKEEPING_MIGRATION_MATRIX.filter(
|
||||
(row) => row.status === "REMOVED",
|
||||
).length;
|
||||
console.log(
|
||||
`Housekeeping runtime parity: discovered=137 mapped=137 verified=137 removed=${removed}`,
|
||||
`Housekeeping migration matrix: ${HOUSEKEEPING_MIGRATION_MATRIX.length}/${discovered.length} valid`,
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user