feat: pin sessions to workspace revisions
This commit is contained in:
@@ -153,6 +153,17 @@ export class WorkspaceRegistry {
|
||||
}
|
||||
}
|
||||
|
||||
/** Read a retained immutable snapshot for a session pinned to a historical commit. */
|
||||
async readPinned(id: string, commit: string): Promise<{ workspace: WorkspaceDescriptor; workspaceConfigPath: string }> {
|
||||
const snapshotPath = this.snapshotPath(safeCommit(commit), id);
|
||||
try {
|
||||
const source = await readFile(snapshotPath, "utf8");
|
||||
return { workspace: parseWorkspaceYaml(source), workspaceConfigPath: snapshotPath };
|
||||
} catch (error) {
|
||||
throw workspaceError(error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Publish canonical YAML and derived public documentation as one optimistic Git revision.
|
||||
* The browser never provides paths or generated artifacts; those are derived server-side.
|
||||
|
||||
Reference in New Issue
Block a user