feat(catalog): persist idempotent bulk operations and retryable deliveries

This commit is contained in:
Simo committed 2026-09-13 18:05:03 +02:00
1 parent 76e46d295c
commit 13665e0c3c
53 files changed
+1316 -76

No files matched your search

@@ -605,15 +605,15 @@ describe("housekeeping foundation completion contracts", () => {
expect(html).toContain(`>${sentinel}</button>`);
});
it("validates the complete 142-row migration matrix without issues", () => {
it("validates the complete 143-row migration matrix without issues", () => {
const discovered = discoverLegacyPages();
const issues = validateMigrationEntries(
discovered,
HOUSEKEEPING_MIGRATION_MATRIX,
);
expect(HOUSEKEEPING_MIGRATION_MATRIX).toHaveLength(142);
expect(discovered).toHaveLength(142);
expect(HOUSEKEEPING_MIGRATION_MATRIX).toHaveLength(143);
expect(discovered).toHaveLength(143);
expect(issues).toEqual([]);
});
});
@@ -29,7 +29,7 @@ describe("discoverLegacyPages", () => {
it("discovers the exact legacy administration inventory", () => {
const pages = discoverLegacyPages();
expect(pages).toHaveLength(142);
expect(pages).toHaveLength(143);
expect(pages).toContainEqual({
surface: "admin",
legacyPath: "/admin/users/:id/edit",
@@ -4,10 +4,10 @@ import { HOUSEKEEPING_MIGRATION_MATRIX } from "./matrix";
import { validateMigrationEntries } from "./validate-matrix";
describe("HOUSEKEEPING_MIGRATION_MATRIX", () => {
it("covers all 142 legacy pages exactly once", () => {
it("covers all 143 legacy pages exactly once", () => {
const discovered = discoverLegacyPages();
expect(HOUSEKEEPING_MIGRATION_MATRIX).toHaveLength(142);
expect(HOUSEKEEPING_MIGRATION_MATRIX).toHaveLength(143);
expect(
validateMigrationEntries(discovered, HOUSEKEEPING_MIGRATION_MATRIX),
).toEqual([]);
@@ -18,8 +18,8 @@ const SYSTEM_PREFIXES = [
] as const;
describe("systemMigrationEntries", () => {
it("covers all 22 System pages exactly once", () => {
expect(systemMigrationEntries).toHaveLength(22);
it("covers all 23 System pages exactly once", () => {
expect(systemMigrationEntries).toHaveLength(23);
expect(
validateMigrationEntries(
ownedLegacyPages(SYSTEM_PREFIXES),
@@ -58,6 +58,24 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
localization: "PARTIAL",
accessibility: "PARTIAL",
}),
plannedSystemEntry({
surface: "admin",
legacyPath: "/admin/devops/deliveries",
sourceFile: "src/app/admin/devops/deliveries/page.tsx",
targetPath: "/admin/system/operations/deliveries",
decision: "REHOST",
capabilities: { read: [PERMS.DEVOPS_VIEW], mutate: [PERMS.DEVOPS_EDIT] },
dependencies: {
queries: ["cms_operations", "cms_outbox"],
mutations: ["retryDelivery"],
},
auditRequirement: "PRIVILEGED_MUTATION",
localization: "PARTIAL",
accessibility: "PARTIAL",
notes: [
"Retries failed effects only; does not replay committed catalog mutations",
],
}),
// Operator alerts and read-only analytics.
plannedSystemEntry({
surface: "admin",