Complete orchestration V2 application services

This commit is contained in:
Julius Marminge authored and Julius Marminge committed 2026-08-07 13:18:41 +02:00
1 parent ffd02c6239
commit 14abe0feb7
30 files changed
+2621 -131

No files matched your search

@@ -129,4 +129,24 @@ it.layer(TestLayer)("ProjectService", (it) => {
assert.equal(error._tag, "ProjectConflictError");
}),
);
it.effect("auto-bootstraps a workspace exactly once", () =>
Effect.gen(function* () {
const service = yield* ProjectService.ProjectService;
yield* TestClock.setTime(Date.parse("2026-06-20T10:00:00.000Z"));
const input = {
projectId: ProjectId.make("project:bootstrap"),
title: "Bootstrap",
workspaceRoot: "/work/bootstrap/",
};
const first = yield* service.bootstrap(input);
const second = yield* service.bootstrap({
...input,
projectId: ProjectId.make("project:bootstrap:unused"),
});
assert.isTrue(first.created);
assert.isFalse(second.created);
assert.equal(second.project.id, first.project.id);
}),
);
});