feat(server): configure workspace service port allocation (#2165)

* starr

* fix(server): honor service port allocator contracts

* fix(server): pass workspace context to port scripts

* fix(server): cancel released service port plans

* test(server): support Windows port allocator fixtures

* docs(worktrees): clarify shell-less portScript execution
This commit is contained in:
Matt Cowger
2026-07-20 20:50:01 +02:00
committed by GitHub
parent 2ead7e7719
commit 9292f58896
14 changed files with 738 additions and 15 deletions
@@ -33,6 +33,28 @@ describe("paseo config schema", () => {
});
});
it("parses service port allocation", () => {
expect(
PaseoConfigSchema.parse({
worktree: {
servicePorts: { range: "3000-4000", portScript: "/usr/bin/portmake" },
},
}),
).toEqual({
worktree: {
setup: [],
teardown: [],
servicePorts: { range: "3000-4000", portScript: "/usr/bin/portmake" },
},
});
});
it("rejects invalid service port ranges", () => {
expect(() =>
PaseoConfigRawSchema.parse({ worktree: { servicePorts: { range: "4000-3000" } } }),
).toThrow("Expected an inclusive TCP port range");
});
it("normalizes partial worktree lifecycle config without dropping present commands", () => {
expect(
PaseoConfigSchema.parse({