fix: preserve evidence revision staleness semantics

This commit is contained in:
2026-08-09 18:45:56 +02:00
parent 266a604892
commit c7a369f436
3 changed files with 49 additions and 5 deletions
+6
View File
@@ -383,6 +383,12 @@ export class WorkspaceRegistry {
if (request.baseCommit !== status.head || (
request.action !== "create" && existing?.blob !== request.baseBlob
)) {
const contentOnlyStale = request.action !== "create"
&& request.baseCommit !== status.head
&& existing?.blob === request.baseBlob;
if (contentOnlyStale) {
throw new WorkspaceRegistryError("workspace_stale", "Workspace revision is stale");
}
throw await this.conflictFor(request, status.head!, existing, local);
}
if (request.action === "create" && existing) throw await this.conflictFor(request, status.head!, existing, local);