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
@@ -162,4 +162,28 @@ public sealed class TeamOverviewTests
public void Without_units_there_is_nothing_to_roll_up()
=> TeamOverview.RollUp(new OrgChart([], [new AgentConfig { AgentId = "a" }]), [Member("a", null, TeamState.Problem)])
.ShouldBeEmpty();
// ─── #720: conflict hotspots ───
[Fact]
public void A_hotspot_is_shown_relative_to_the_agents_folder()
{
var agents = Path.Combine(Path.GetTempPath(), "inst", "Agents");
var configured = new List<AgentConfig> { new() { AgentId = "a", SharedWorkspacePath = Path.Combine(agents, "SharedWorkspace") } };
TeamOverview.Readable(Path.Combine(agents, "SharedWorkspaces", "articles", "list.csv"), configured)
.ShouldBe("SharedWorkspaces/articles/list.csv");
TeamOverview.Readable(Path.Combine(agents, "SharedWorkspace", "plan.md"), configured)
.ShouldBe("SharedWorkspace/plan.md");
}
[Fact]
public void A_path_elsewhere_stays_as_it_is()
{
var configured = new List<AgentConfig> { new() { AgentId = "a", SharedWorkspacePath = Path.Combine(Path.GetTempPath(), "inst", "Agents", "SharedWorkspace") } };
var elsewhere = Path.Combine(Path.GetTempPath(), "other", "x.md");
TeamOverview.Readable(elsewhere, configured).ShouldBe(elsewhere);
TeamOverview.Readable(elsewhere, []).ShouldBe(elsewhere);
}
}