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:
co-authored by
Claude Opus 5.5
parent
da4ceac7d5
commit
837a634a22
@@ -5,8 +5,8 @@ using ClawdDotNet.Core.Tools;
|
||||
namespace ClawdDotNet.Core.Tests.Infrastructure;
|
||||
|
||||
/// <summary>
|
||||
/// Konfigurierbares Tool für Engine-Tests: liefert feste Ergebnisse, kann verzögern
|
||||
/// (um Nebenläufigkeit zu provozieren) oder werfen.
|
||||
/// Configurable tool for engine tests: delivers fixed results, can delay
|
||||
/// (to provoke concurrency) or throw.
|
||||
/// </summary>
|
||||
internal sealed class FakeTool : IAgentTool
|
||||
{
|
||||
@@ -19,18 +19,18 @@ internal sealed class FakeTool : IAgentTool
|
||||
{ "type": "object", "properties": { "action": { "type": "string" } } }
|
||||
""").RootElement.Clone();
|
||||
|
||||
/// <summary>Jeder Aufruf wird mitgeschrieben — inklusive der aufrufenden Agent-Id.</summary>
|
||||
/// <summary>Every call is recorded — including the calling agent ID.</summary>
|
||||
public ConcurrentBag<string> Invocations { get; } = new();
|
||||
|
||||
/// <summary>Ob das Werkzeug sich für gleichzeitige Ausführung freigibt (#551).</summary>
|
||||
/// <summary>Whether the tool declares itself fit for simultaneous execution (#551).</summary>
|
||||
public bool IsParallelSafe { get; private init; }
|
||||
|
||||
/// <summary>
|
||||
/// Höchste Zahl gleichzeitig laufender Aufrufe, die dieses Werkzeug gesehen hat.
|
||||
/// Highest number of simultaneously running calls this tool has seen.
|
||||
///
|
||||
/// Das ist der einzige Nachweis, der zählt: Eine kürzere Gesamtlaufzeit könnte auch
|
||||
/// von einer schnellen Maschine kommen, aber ein Höchststand von 2 kann nur
|
||||
/// entstehen, wenn zwei Aufrufe einander tatsächlich überlappt haben.
|
||||
/// That is the only proof that counts: a shorter total runtime could also
|
||||
/// come from a fast machine, but a peak of 2 can only
|
||||
/// arise if two calls actually overlapped each other.
|
||||
/// </summary>
|
||||
public int MaxConcurrent => _maxConcurrent;
|
||||
|
||||
@@ -44,8 +44,8 @@ internal sealed class FakeTool : IAgentTool
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ein langsames Werkzeug, das sich für Nebenläufigkeit freigibt und mitzählt,
|
||||
/// wie viele Aufrufe sich überlappt haben.
|
||||
/// A slow tool that declares itself fit for concurrency and counts
|
||||
/// how many calls overlapped.
|
||||
/// </summary>
|
||||
public static FakeTool SlowParallelSafe(TimeSpan delay, string result = "ok", string name = "ParallelTool")
|
||||
=> new(name, async (_, _, ct) =>
|
||||
@@ -55,7 +55,7 @@ internal sealed class FakeTool : IAgentTool
|
||||
})
|
||||
{ IsParallelSafe = true };
|
||||
|
||||
/// <summary>Dasselbe, aber ohne Freigabe — muss seriell bleiben.</summary>
|
||||
/// <summary>The same, but without declaring itself fit — must stay serial.</summary>
|
||||
public static FakeTool SlowSerial(TimeSpan delay, string result = "ok", string name = "SerialTool")
|
||||
=> new(name, async (_, _, ct) =>
|
||||
{
|
||||
@@ -66,7 +66,7 @@ internal sealed class FakeTool : IAgentTool
|
||||
public static FakeTool Returning(string result, string name = "TestTool")
|
||||
=> new(name, (_, _, _) => Task.FromResult(ToolResult.Ok(result)));
|
||||
|
||||
/// <summary>Verzögert die Ausführung — vergrößert das Zeitfenster für Races.</summary>
|
||||
/// <summary>Delays execution — enlarges the time window for races.</summary>
|
||||
public static FakeTool Slow(TimeSpan delay, string result = "ok", string name = "TestTool")
|
||||
=> new(name, async (_, _, ct) =>
|
||||
{
|
||||
@@ -74,7 +74,7 @@ internal sealed class FakeTool : IAgentTool
|
||||
return ToolResult.Ok(result);
|
||||
});
|
||||
|
||||
/// <summary>Scheitert jedes Mal mit derselben Meldung - fuer die Wiederholungswache (#581).</summary>
|
||||
/// <summary>Fails every time with the same message - for the repetition guard (#581).</summary>
|
||||
public static FakeTool Failing(string error, string name = "TestTool")
|
||||
=> new(name, (_, _, _) => Task.FromResult(ToolResult.Fail(error)));
|
||||
|
||||
@@ -95,8 +95,8 @@ internal sealed class FakeTool : IAgentTool
|
||||
|
||||
var now = Interlocked.Increment(ref _current);
|
||||
|
||||
// Höchststand fortschreiben, ohne ihn je zu senken: Vergleichen und Tauschen,
|
||||
// bis der gespeicherte Wert nicht mehr kleiner ist.
|
||||
// Advance the peak without ever lowering it: compare and swap
|
||||
// until the stored value is no longer smaller.
|
||||
int seen;
|
||||
while (now > (seen = Volatile.Read(ref _maxConcurrent)))
|
||||
Interlocked.CompareExchange(ref _maxConcurrent, now, seen);
|
||||
|
||||
Reference in New Issue
Block a user