feat: atomic revision-qualified annotations sync with ownership manifest (P5)
This commit is contained in:
@@ -4,6 +4,7 @@ import { mkdir, readdir, readFile, rename, rm, writeFile } from "node:fs/promise
|
||||
import { isAbsolute, join } from "node:path";
|
||||
import { buildInstallationContract, renderWorkspaceDocs } from "./contracts.js";
|
||||
import { parseAnnotationsYaml } from "./annotations.js";
|
||||
import { syncAnnotations } from "./annotations-sync.js";
|
||||
import { assertCatalogMatchesDescriptor, parseWorkspaceCatalogYaml, type WorkspaceCatalog, type WorkspaceCatalogEntry } from "./catalog.js";
|
||||
import {
|
||||
GitWorkspaceRepository,
|
||||
@@ -585,6 +586,15 @@ export class WorkspaceRegistry {
|
||||
const annotations = await this.repository.annotationsObject(safeHead, id);
|
||||
if (annotations !== undefined) {
|
||||
parseAnnotationsYaml(annotations.contents.toString("utf8"));
|
||||
if (this.config.dataRoot !== undefined) {
|
||||
syncAnnotations({
|
||||
dataRoot: this.config.dataRoot,
|
||||
workspaceId: id,
|
||||
commit: safeHead,
|
||||
blobId: annotations.blobId,
|
||||
contents: annotations.contents,
|
||||
});
|
||||
}
|
||||
}
|
||||
const collection = workspace.semantic_index.vector_store.collection;
|
||||
const owner = collectionOwners.get(collection);
|
||||
|
||||
Reference in New Issue
Block a user