Stufe 4c (#764): Kommentare in C#, WebUI-Skripten, CSS und HTML auf Englisch

Rund 2.600 Kommentarblöcke in 310 C#-Dateien übersetzt, Begründungen vollständig
erhalten: blockweise gleiche Anzahl wie vorher, kein Block unter 60 % seiner
Länge, der Code außerhalb der Kommentare per Tokenizer byte-identisch geprüft.
Zitate deutscher Oberflächentexte und Testdaten bleiben deutsch.

WebUI: Kommentare in JS/CSS/HTML übersetzt, JSDoc-@param an die in 4b
umbenannten Parameter angeglichen.

Dabei behoben:
- 4b hatte "tag" (HTML-Tag) als deutsches "Tag" gelesen und zu "dayValue"
  gemacht (makeElement, svg, Tagesübersicht) - zurück auf tag/day.
- Aufgaben "InProgress" bekamen die Plakettenart "laufend", für die es nie eine
  CSS-Klasse gab - jetzt "success" wie laufende Instanzen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard
2026-10-04 12:45:03 +02:00
co-authored by Claude Opus 5.5
parent da4ceac7d5
commit 837a634a22
311 changed files with 7238 additions and 7252 deletions
@@ -5,18 +5,18 @@ using Shouldly;
namespace ClawdDotNet.Core.Tests.Audit;
/// <summary>
/// A3 an der Engine: Jeder Tool-Aufruf wird protokolliert, jeder Lauf bekommt einen Beleg.
/// Entscheidend ist die Provenienz — die Engine stempelt Agent, Modell und Herkunft aus
/// ihrem eigenen Wissen, nicht aus dem Tool-Ergebnis.
/// A3 on the engine: every tool call is logged, every run gets a receipt.
/// What matters is the provenance — the engine stamps agent, model and origin from
/// its own knowledge, not from the tool result.
///
/// <para>Seit #554 erzeugt ein ausgefuehrter Aufruf ZWEI Eintraege: erst
/// <see cref="AuditStatus.Started"/> vor der Wirkung, dann den Ausgang. Die Tests
/// hier filtern deshalb auf den Abschluss, wo es um den Ausgang geht — dass der
/// Beginn mitgeschrieben wird, pruefen die WiederaufnahmeTests.</para>
/// <para>Since #554 an executed call produces TWO entries: first
/// <see cref="AuditStatus.Started"/> before the effect, then the outcome. The tests
/// here therefore filter on the completion where the outcome is concerned — that the
/// start is recorded too is checked by the WiederaufnahmeTests.</para>
///
/// <para>Ein Aufruf, der gar nicht erst laeuft (verweigert, unbekannt, vorgelegt),
/// hat weiterhin genau einen Eintrag: Der Beginn wird erst nach Rechtepruefung und
/// Staging geschrieben.</para>
/// <para>A call that does not even run (refused, unknown, presented)
/// still has exactly one entry: the start is only written after the permission check and
/// staging.</para>
/// </summary>
public sealed class EngineAuditTests
{
@@ -27,7 +27,7 @@ public sealed class EngineAuditTests
var fixture = new EngineFixture(audit).WithTool(FakeTool.Returning("ok"));
var agent = fixture.AddAgent("agent-a", "TestTool");
// Zwei Tool-Aufrufe, dann Text.
// Two tool calls, then text.
fixture.Client
.RespondsWithToolCall("TestTool")
.RespondsWithToolCall("TestTool")
@@ -37,13 +37,13 @@ public sealed class EngineAuditTests
var entries = audit.Entries.ToList();
// Zwei Aufrufe, je ein Beginn und ein Abschluss.
// Two calls, one start and one completion each.
entries.Count.ShouldBe(4);
entries.ShouldAllBe(e => e.Tool == "TestTool");
entries.Count(e => e.Status == AuditStatus.Started).ShouldBe(2);
entries.Count(e => e.Status == AuditStatus.Ok).ShouldBe(2);
// Jeder Beginn gehoert zu genau einem Abschluss.
// Every start belongs to exactly one completion.
entries.Where(e => e.Status == AuditStatus.Started).Select(e => e.CallId)
.ShouldBe(entries.Where(e => e.Status == AuditStatus.Ok).Select(e => e.CallId),
ignoreOrder: true);
@@ -70,9 +70,9 @@ public sealed class EngineAuditTests
public async Task Ein_verweigerter_Aufruf_wird_als_denied_protokolliert()
{
var audit = new InMemoryAuditRepository();
// Tool ist registriert, aber dem Agenten NICHT zugewiesen → PermissionGate greift.
// Tool is registered but NOT assigned to the agent → PermissionGate applies.
var fixture = new EngineFixture(audit).WithTool(FakeTool.Returning("ok"));
var agent = fixture.AddAgent("agent-a" /* kein Tool zugewiesen */);
var agent = fixture.AddAgent("agent-a" /* no tool assigned */);
fixture.Client.RespondsWithToolCall("TestTool").RespondsWithText("fertig");
await fixture.Engine.RunAsync(agent, "los", "test-instance", default);
@@ -102,7 +102,7 @@ public sealed class EngineAuditTests
var audit = new InMemoryAuditRepository();
var fixture = new EngineFixture(audit).WithTool(FakeTool.Returning("ok"));
var agent = fixture.AddAgent("agent-a", "TestTool");
// Aufgabenlaeufe enden seit #577 erst mit einer Ergebniszeile.
// Since #577 task runs only end with a result line.
fixture.Client.RespondsWithToolCall("TestTool").RespondsWithText("ERGEBNIS: ok - erledigt");
await fixture.Engine.RunAsync(agent, "los", "test-instance", default, source: "task", taskId: "t-42");
@@ -132,7 +132,7 @@ public sealed class EngineAuditTests
[Fact]
public async Task Ohne_Audit_Repository_laeuft_alles_normal_weiter()
{
// Gegenprobe: A3 ist optional — die Engine darf ohne Audit-Repo nicht anders laufen.
// Counter-check: A3 is optional — the engine must not run differently without an audit repo.
var fixture = new EngineFixture().WithTool(FakeTool.Returning("ok"));
var agent = fixture.AddAgent("agent-a", "TestTool");
fixture.Client.RespondsWithToolCall("TestTool").RespondsWithText("fertig");