Verlorene Updates erkennen statt warten: optimistische Pruefung beim Ersetzen, Konflikte im Audit und im Lagebild (#720)

FileLedger merkt je Agent die gelesene Fassung einer Datei in gemeinsamen
Bereichen. write, copy und Downloads (FTP, RocketChat) ersetzen eine Datei nur,
wenn sie seit dem Lesen unveraendert ist; eine fremde Datei nicht ungelesen.
append bleibt ungeprueft, macht aeltere Lesestaende aber ungueltig.
Abgelehnte Schreibvorgaenge: eigener Audit-Status Conflict, Tabelle
FileConflicts, Hotspots (>= 3 in 7 Tagen) in der Teamuebersicht.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard
2026-09-28 10:45:46 +02:00
co-authored by Claude Opus 5.5
parent 8a7212c240
commit 79a3a7854f
21 changed files with 818 additions and 11 deletions
@@ -55,6 +55,12 @@ public sealed record AgentToolContext(
/// <summary>#717: Special budgets — set up by an approved request_budget.</summary>
public Budget.ISpecialBudgetRepository? SpecialBudgets { get; init; }
/// <summary>
/// #720: Which version of a shared file each agent read. Tools that replace files in a
/// shared workspace check it first. <c>null</c> in tests and outside the engine: no check.
/// </summary>
public Files.FileLedger? Files { get; init; }
/// <summary>#697: The run this call belongs to — for stamping where something came from.</summary>
public string? RunId { get; init; }
+5
View File
@@ -9,4 +9,9 @@ public sealed record ToolResult(
public static ToolResult Ok(string content) => new(true, content);
public static ToolResult Fail(string error) => new(false, "", error);
/// <summary>#720: Refused because it would have lost another write — audited as a conflict, not as an error.</summary>
public bool IsConflict { get; init; }
public static ToolResult Conflict(string error) => new(false, "", error) { IsConflict = true };
}