fix: bootstrap registry on first workspace list

This commit is contained in:
2026-08-05 16:49:56 +02:00
parent b93f13e39e
commit 840db9bd4f
3 changed files with 49 additions and 0 deletions
+15
View File
@@ -254,6 +254,21 @@ test("bootstraps a checkout and activates a validated immutable snapshot", async
});
});
test("first list lazily bootstraps a clean registry", async () => {
const remote = await fixture();
const root = join(remote.root, "registry");
const registry = new WorkspaceRegistry(config(root, remote.remote));
await expect(registry.list()).resolves.toEqual([
expect.objectContaining({
id: "psd-clinical",
commit: remote.initialCommit,
state: "operational",
}),
]);
expect(existsSync(join(root, "state", "active.json"))).toBe(true);
});
test("publishes create, update, and delete with the configured Git author identity", async () => {
const remote = await fixture();
const registry = new WorkspaceRegistry(config(join(remote.root, "registry"), remote.remote, {