Handle merge conflicts as orchestration events
This commit is contained in:
@@ -62,6 +62,35 @@ test("project context store reads defaults and applies domain patches", async ()
|
||||
assert.equal(updated.schemaVersion, 1);
|
||||
});
|
||||
|
||||
test("project context accepts conflict-aware task statuses", async () => {
|
||||
const root = await mkdtemp(resolve(tmpdir(), "ai-ops-project-context-conflict-"));
|
||||
const store = new FileSystemProjectContextStore({
|
||||
filePath: resolve(root, "project-context.json"),
|
||||
});
|
||||
|
||||
const updated = await store.patchState({
|
||||
upsertTasks: [
|
||||
{
|
||||
taskId: "task-conflict",
|
||||
id: "task-conflict",
|
||||
title: "Resolve merge conflict",
|
||||
status: "conflict",
|
||||
},
|
||||
{
|
||||
taskId: "task-resolving",
|
||||
id: "task-resolving",
|
||||
title: "Retry merge",
|
||||
status: "resolving_conflict",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
assert.deepEqual(
|
||||
updated.taskQueue.map((task) => `${task.taskId}:${task.status}`),
|
||||
["task-conflict:conflict", "task-resolving:resolving_conflict"],
|
||||
);
|
||||
});
|
||||
|
||||
test("project context parser merges missing root keys with defaults", async () => {
|
||||
const root = await mkdtemp(resolve(tmpdir(), "ai-ops-project-context-"));
|
||||
const filePath = resolve(root, "project-context.json");
|
||||
|
||||
Reference in New Issue
Block a user