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
@@ -7,12 +7,12 @@ using ClawdDotNet.Core.Tests.Infrastructure;
namespace ClawdDotNet.Core.Tests.Engine;
/// <summary>
/// Die Härtung des Harness gegen stillen Verlust: #547 bis #551.
/// The hardening of the harness against silent loss: #547 to #551.
///
/// Was diese fünf Befunde verbindet, ist nicht der Ort im Code, sondern der
/// Fehlermodus — keiner von ihnen erzeugt eine Fehlermeldung. Der Lauf wird fertig,
/// das Ergebnis sieht plausibel aus, und nur die Qualität ist schlechter. Genau
/// deshalb braucht jeder einen Test: Von Hand fällt so etwas nicht auf.
/// What connects these five findings is not the place in the code, but the
/// failure mode — none of them produces an error message. The run finishes,
/// the result looks plausible, and only the quality is worse. Exactly
/// that's why each needs a test: by hand such a thing is not noticed.
/// </summary>
public class HarnessHaertungTests
{
@@ -30,7 +30,7 @@ public class HarnessHaertungTests
await fixture.Engine.RunAsync(agent, "Los", "inst", CancellationToken.None);
// Die zweite Anfrage trägt den Verlauf, den die erste erzeugt hat.
// The second request carries the history the first one produced.
var verlauf = fixture.Client.ReceivedRequests[1].Messages;
var mitAufruf = verlauf.Single(m => m.Role == "assistant" && m.ToolCalls is { Count: > 0 });
@@ -40,8 +40,8 @@ public class HarnessHaertungTests
[Fact]
public async Task Ohne_Begleittext_bleibt_die_Nachricht_ohne_Inhalt()
{
// Gegenprobe: Ein leerer Text darf nicht als "" mitgehen. Manche Anbieter
// lehnen eine assistant-Nachricht mit leerem Inhalt und tool_calls ab.
// Counter-check: an empty text must not go along as "". Some providers
// reject an assistant message with empty content and tool_calls.
var fixture = new EngineFixture().WithTool(FakeTool.Returning("Ergebnis"));
var agent = fixture.AddAgent("a1", "TestTool");
@@ -86,8 +86,8 @@ public class HarnessHaertungTests
Assert.Equal(AgentRunStatus.Truncated, result.Status);
// Das Teilergebnis geht trotzdem mit — es wegzuwerfen wäre schlimmer, als es
// gekennzeichnet weiterzureichen.
// The partial result goes along anyway — throwing it away would be worse than
// passing it on marked.
Assert.Equal("Der Bericht beginnt mit", result.FinalMessage);
}
@@ -127,8 +127,8 @@ public class HarnessHaertungTests
Assert.NotNull(mitAufruf.ReasoningDetails);
// Signatur und Reihenfolge müssen erhalten sein — daran erkennt der Anbieter
// seinen eigenen Block wieder.
// Signature and order must be preserved — by them the provider recognizes
// its own block.
var block = mitAufruf.ReasoningDetails!.Value[0];
Assert.Equal("reasoning.text", block.GetProperty("type").GetString());
Assert.Equal("sha256:abc", block.GetProperty("signature").GetString());
@@ -137,8 +137,8 @@ public class HarnessHaertungTests
[Fact]
public void Der_Denkverlauf_ueberlebt_Serialisierung_und_Rueckweg()
{
// Der Verlauf wird auf die Platte geschrieben und beim Start wieder geladen.
// Überlebt der Denkverlauf das nicht, ist er nach einem Neustart weg.
// The history is written to disk and loaded again at startup.
// If the reasoning does not survive that, it is gone after a restart.
const string details = """
[{"type":"reasoning.encrypted","data":"AAAA","id":"r1","index":0}]
""";
@@ -200,7 +200,7 @@ public class HarnessHaertungTests
public async Task Ohne_Denktiefe_geht_kein_reasoning_Feld_mit()
{
var fixture = new EngineFixture();
var agent = fixture.AddAgent("a1"); // Vorgabe ist "off"
var agent = fixture.AddAgent("a1"); // the default is "off"
fixture.Client.RespondsWithText("ok");
await fixture.Engine.RunAsync(agent, "Los", "inst", CancellationToken.None);
@@ -249,8 +249,8 @@ public class HarnessHaertungTests
[Fact]
public async Task Ohne_gemeldeten_Betrag_bleibt_das_Feld_leer()
{
// Wichtig: nicht 0. Ein als kostenlos verbuchter Lauf wäre schlimmer als
// gar keine Angabe, weil er die Budgetrechnung still verfälscht.
// Important: not 0. A run booked as free would be worse than
// no information at all, because it silently falsifies the budget calculation.
var fixture = new EngineFixture();
var agent = fixture.AddAgent("a1");
fixture.Client.RespondsWithText("ok");
@@ -278,12 +278,12 @@ public class HarnessHaertungTests
await fixture.Engine.RunAsync(agent, "Los", "inst", CancellationToken.None);
// Der belastbare Nachweis: Aufrufe haben sich überlappt.
// The reliable proof: calls overlapped.
//
// Hier stand zusätzlich eine Wanduhr-Prüfung (unter 750 ms, seriell wären es 900).
// Sie schlug am 2026-09-24 mit 927 ms fehl, als die Testprojekte parallel liefen —
// die Zeit misst die Last der Maschine, nicht das Verhalten der Engine. Der
// Höchststand gleichzeitiger Aufrufe beweist dasselbe, ohne zu wackeln.
// Here there was additionally a wall-clock check (below 750 ms, serially it would be 900).
// It failed on 2026-09-24 with 927 ms when the test projects ran in parallel —
// the time measures the load of the machine, not the behavior of the engine. The
// peak of simultaneous calls proves the same without wobbling.
Assert.True(tool.MaxConcurrent > 1,
$"Erwartet: überlappende Aufrufe. Höchststand war {tool.MaxConcurrent}.");
}
@@ -310,8 +310,8 @@ public class HarnessHaertungTests
[Fact]
public async Task Die_Reihenfolge_der_Ergebnisse_folgt_den_Aufrufen()
{
// Der langsamste Aufruf kommt zuerst. Würde die Engine nach Fertigstellung
// einsortieren, stünde er am Ende — und jede tool_call_id wäre falsch zugeordnet.
// The slowest call comes first. If the engine sorted by completion,
// it would be at the end — and every tool_call_id would be assigned wrongly.
var tool = new StaffelTool();
var fixture = new EngineFixture().WithTool(tool);
var agent = fixture.AddAgent("a1", "StaffelTool");
@@ -378,9 +378,9 @@ public class HarnessHaertungTests
}
/// <summary>
/// Werkzeug, das nach einer im Aufruf angegebenen Zeit eine Marke zurückgibt.
/// Damit lässt sich prüfen, ob die Reihenfolge der Ergebnisse den Aufrufen folgt
/// und nicht der Fertigstellung.
/// Tool that returns a marker after a time given in the call.
/// This allows checking whether the order of the results follows the calls
/// and not the completion.
/// </summary>
internal sealed class StaffelTool : ClawdDotNet.Core.Tools.IAgentTool
{