feat(lanes): record which CLI tool drives a lane
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user