fix: close internal semantic review gaps
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
isCanonicalWorkspace,
|
||||
parseWorkspaceYaml,
|
||||
serializeWorkspaceYaml,
|
||||
validateOperationalWorkspace,
|
||||
type CanonicalWorkspace,
|
||||
type WorkspaceDescriptor,
|
||||
} from "./schema.js";
|
||||
@@ -216,7 +217,9 @@ export class WorkspaceRegistry {
|
||||
}
|
||||
let workspace: WorkspaceDescriptor;
|
||||
try {
|
||||
workspace = parseWorkspaceYaml(await readFile(revision.snapshotPath, "utf8"));
|
||||
workspace = validateOperationalWorkspace(
|
||||
parseWorkspaceYaml(await readFile(revision.snapshotPath, "utf8")),
|
||||
);
|
||||
} catch (error) {
|
||||
throw workspaceError(error);
|
||||
}
|
||||
@@ -259,7 +262,10 @@ export class WorkspaceRegistry {
|
||||
const snapshotPath = this.snapshotPath(safeCommit(commit), id);
|
||||
try {
|
||||
const source = await readFile(snapshotPath, "utf8");
|
||||
return { workspace: parseWorkspaceYaml(source), workspaceConfigPath: snapshotPath };
|
||||
return {
|
||||
workspace: validateOperationalWorkspace(parseWorkspaceYaml(source)),
|
||||
workspaceConfigPath: snapshotPath,
|
||||
};
|
||||
} catch (error) {
|
||||
throw workspaceError(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user