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
@@ -8,9 +8,9 @@ using Shouldly;
|
||||
namespace ClawdDotNet.Core.Tests.Api;
|
||||
|
||||
/// <summary>
|
||||
/// B12 aus der Bestandsaufnahme: Der Client warf bei jedem Nicht-2xx sofort. Ein
|
||||
/// einzelnes HTTP 429 beendete damit einen kompletten geplanten Lauf, obwohl
|
||||
/// Rate-Limits und kurze 5xx bei OpenRouter Normalbetrieb sind.
|
||||
/// B12 from the inventory: the client threw immediately on every non-2xx. A
|
||||
/// single HTTP 429 thus ended a complete scheduled run, although
|
||||
/// rate limits and brief 5xx are normal operation at OpenRouter.
|
||||
/// </summary>
|
||||
public sealed class RetryPolicyTests
|
||||
{
|
||||
@@ -28,8 +28,8 @@ public sealed class RetryPolicyTests
|
||||
[InlineData(HttpStatusCode.Conflict, false)]
|
||||
public void Nur_voruebergehende_Stoerungen_werden_wiederholt(HttpStatusCode status, bool expected)
|
||||
{
|
||||
// Ein 400 oder 401 wiederholt sich nicht von selbst — dafür zu warten
|
||||
// verzögert nur die Fehlermeldung.
|
||||
// A 400 or 401 does not repeat itself by itself — waiting for it
|
||||
// only delays the error message.
|
||||
RetryPolicy.Default.ShouldRetry(status).ShouldBe(expected);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public sealed class RetryPolicyTests
|
||||
[Fact]
|
||||
public void Auch_ein_RetryAfter_wird_gedeckelt()
|
||||
{
|
||||
// Ein Server könnte Stunden verlangen — so lange darf kein Lauf blockieren.
|
||||
// A server could demand hours — no run may block that long.
|
||||
var policy = new RetryPolicy { MaxDelay = TimeSpan.FromSeconds(30) };
|
||||
|
||||
policy.GetDelay(1, TimeSpan.FromHours(1)).ShouldBe(TimeSpan.FromSeconds(30));
|
||||
@@ -99,7 +99,7 @@ public sealed class OpenRouterClientRetryTests
|
||||
private const string SuccessBody =
|
||||
"""{"id":"x","choices":[{"index":0,"message":{"role":"assistant","content":"Hi"}}]}""";
|
||||
|
||||
/// <summary>Wartet nicht wirklich — sonst dauerte die Suite Sekunden.</summary>
|
||||
/// <summary>Does not really wait — otherwise the suite would take seconds.</summary>
|
||||
private static Task NoWait(TimeSpan _, CancellationToken __) => Task.CompletedTask;
|
||||
|
||||
private static OpenRouterClient CreateClient(FakeHttpMessageHandler handler, RetryPolicy? policy = null)
|
||||
@@ -159,7 +159,7 @@ public sealed class OpenRouterClientRetryTests
|
||||
[Fact]
|
||||
public async Task Ein_dauerhafter_Fehler_wird_nicht_wiederholt()
|
||||
{
|
||||
// Ein 401 wird durch Warten nicht besser — sofort melden.
|
||||
// A 401 does not get better by waiting — report immediately.
|
||||
var handler = new FakeHttpMessageHandler()
|
||||
.Responds(HttpStatusCode.Unauthorized, """{"error":"invalid key"}""");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user