feat: resolve workspace bindings into runtime configs

This commit is contained in:
2026-08-03 21:49:57 +02:00
parent 5a654939a5
commit 049f8675c6
6 changed files with 528 additions and 3 deletions
+7
View File
@@ -169,6 +169,13 @@ test("buildArgv appends -c AFTER the subcommand (never a global -c)", () => {
]);
});
test("buildArgv passes an absolute immutable snapshot after the tht subcommand", () => {
const r = new ThtRunner({ thtBin: "tht", harnessDir: "/nope", configPath: "config/tht.yaml" });
expect(r.buildArgv(["session", "new"], "/data/workspace-registry/snapshots/a/psd-clinical.yaml")).toEqual([
"session", "new", "-c", "/data/workspace-registry/snapshots/a/psd-clinical.yaml",
]);
});
test("sqlPreview argv has no positional file — uses --session to resolve path", async () => {
// The harness preview_cmd now resolves sql_final.sql from the session workspace;
// the backend must NOT pass a sessions/<id>/sql_final.sql positional arg.