Stufe 4c (#764): Bezeichner auf Englisch - Typen, Methoden, Felder, Parameter, Locals, Testnamen
Mit Roslyn umbenannt (Verweise folgen, Zeichenketten bleiben unberuehrt). Nicht umbenannt, weil gespeichert oder ueber die API gebunden (Stufe 4e): Properties, Record-Parameter, Enum-Member sowie die Parameter der Endpunkt-Handler (Routen-/Query-Bindung ueber den Namen). Die JSON-Felder anonymer Objekte bleiben ausdruecklich benannt (JsonFilter: pfad). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
837a634a22
commit
77062facc9
@@ -12,10 +12,10 @@ namespace ClawdDotNet.Core.Tests.Engine;
|
||||
public sealed class ToolResultTruncationTests
|
||||
{
|
||||
[Fact]
|
||||
public async Task Ein_riesiges_Toolergebnis_wird_gekappt_bevor_es_in_den_Kontext_geht()
|
||||
public async Task A_huge_tool_result_is_capped_before_it_enters_the_context()
|
||||
{
|
||||
var riesig = new string('x', 500_000);
|
||||
var fixture = new EngineFixture().WithTool(FakeTool.Returning(riesig));
|
||||
var veryLarge = new string('x', 500_000);
|
||||
var fixture = new EngineFixture().WithTool(FakeTool.Returning(veryLarge));
|
||||
var agent = fixture.AddAgent("agent-trunc", "TestTool");
|
||||
agent.MaxToolResultChars = 16_000;
|
||||
|
||||
@@ -33,10 +33,10 @@ public sealed class ToolResultTruncationTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Ein_kleines_Toolergebnis_bleibt_unveraendert()
|
||||
public async Task A_small_tool_result_stays_unchanged()
|
||||
{
|
||||
const string klein = "Alles in Ordnung.";
|
||||
var fixture = new EngineFixture().WithTool(FakeTool.Returning(klein));
|
||||
const string small = "Alles in Ordnung.";
|
||||
var fixture = new EngineFixture().WithTool(FakeTool.Returning(small));
|
||||
var agent = fixture.AddAgent("agent-klein", "TestTool");
|
||||
|
||||
fixture.Client
|
||||
@@ -47,14 +47,14 @@ public sealed class ToolResultTruncationTests
|
||||
|
||||
var context = fixture.Engine.GetChatContext(agent.AgentId);
|
||||
// Since #193 unchanged means: untruncated, only framed.
|
||||
context.Single(m => m.Role == "tool").Content.ShouldBe(UntrustedContent.Rahmen("TestTool", klein));
|
||||
context.Single(m => m.Role == "tool").Content.ShouldBe(UntrustedContent.Frame("TestTool", small));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(100, 50)]
|
||||
[InlineData(1_000, 999)]
|
||||
[InlineData(50_000, 16_000)]
|
||||
public void Gekappte_Ergebnisse_nennen_die_Menge_der_entfallenen_Zeichen(int length, int limit)
|
||||
public void Capped_results_name_the_number_of_dropped_characters(int length, int limit)
|
||||
{
|
||||
var result = AgentEngine.TruncateToolResult(new string('a', length), limit);
|
||||
|
||||
@@ -63,7 +63,7 @@ public sealed class ToolResultTruncationTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Ohne_Limit_wird_nicht_gekappt()
|
||||
public void Without_limit_nothing_is_capped()
|
||||
{
|
||||
var original = new string('a', 100_000);
|
||||
|
||||
@@ -71,7 +71,7 @@ public sealed class ToolResultTruncationTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Genau_auf_der_Grenze_wird_nicht_gekappt()
|
||||
public void Exactly_at_the_limit_nothing_is_capped()
|
||||
{
|
||||
var original = new string('a', 1_000);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user