fix: complete managed Guardian lifecycle

Use locked Guardian membership and transactional lifecycle audits.\n\nKeep acceptance and marker changes atomic.
This commit is contained in:
Marc-André Bombeck committed 2026-08-06 03:05:19 +02:00
1 parent 55291ad32d
commit ffe3225639
8 files changed
+299 -59

No files matched your search

@@ -42,6 +42,16 @@ describe("managed-profile contract", () => {
).toBe(false);
});
it("does not claim notification fanout before its consent plan exists", async () => {
const source = await readFile(
path.join(root, "prisma/schema.prisma"),
"utf8",
);
expect(source).not.toContain("notification dispatcher fans reminders");
expect(source).toContain("later notification plan");
});
it("uses the same record lock for every Guardian-reducing transition", async () => {
const lifecycle = await readFile(
path.join(root, "src/lib/managed-profiles/lifecycle.ts"),