feat(lanes): record which CLI tool drives a lane

This commit is contained in:
2026-08-27 11:00:13 +07:00
parent 97839b1f97
commit a66331f008
4 changed files with 54 additions and 4 deletions
+21
View File
@@ -236,6 +236,27 @@ describe("lanes lib", () => {
assert.equal(p.pipeline_skill, "/ccam:ship-feature");
lanes.deleteLane(l.id);
});
it("createLane defaults tool to claude and accepts codex", () => {
const a = lanes.createLane({ cwd: "/tmp/tool-default" });
assert.equal(a.tool, "claude");
const b = lanes.createLane({ cwd: "/tmp/tool-codex", tool: "codex" });
assert.equal(b.tool, "codex");
});
it("createLane rejects an unknown tool", () => {
assert.throws(
() => lanes.createLane({ cwd: "/tmp/tool-bad", tool: "cursor" }),
(err) => err.code === "EBADTOOL"
);
});
it("updateLane never writes tool (immutable per lane)", () => {
const lane = lanes.createLane({ cwd: "/tmp/tool-immutable", tool: "codex" });
const after = lanes.updateLane(lane.id, { tool: "claude", title: "x" });
assert.equal(after.tool, "codex");
assert.equal(after.title, "x");
});
});
const { withLaneLock } = require("../lib/lane-lock");