mirror of
https://github.com/esengine/DeepSeek-Reasonix.git
synced 2026-11-07 02:36:01 -10:00
test: the coordinator handoff and guardian compaction tests stop scripting a summarizer call, which compaction no longer makes since it archives to a file
This commit is contained in:
1 parent
6264845f53
commit
be92796684
2 files changed
+6
-8
No files matched your search
@@ -1494,11 +1494,7 @@ func TestCoordinatorRunsExecutorWhenMarkerNotAlone(t *testing.T) {
|
||||
// successful plan.
|
||||
func TestCoordinatorHandoffSurvivesPlannerCompaction(t *testing.T) {
|
||||
planner := &mockProvider{name: "planner", streams: [][]provider.Chunk{
|
||||
{ // preflight compaction on the large filler history (estimate-based)
|
||||
{Type: provider.ChunkText, Text: "- goal: prior filler\n- pending: plan the fix"},
|
||||
{Type: provider.ChunkDone},
|
||||
},
|
||||
{ // the plan turn after projection is in place
|
||||
{ // the plan turn; preflight compaction archives the filler without a model call
|
||||
{Type: provider.ChunkText, Text: "Edit main.go and add the missing guard."},
|
||||
{Type: provider.ChunkUsage, Usage: &provider.Usage{PromptTokens: 400, TotalTokens: 450}},
|
||||
{Type: provider.ChunkDone},
|
||||
|
||||
@@ -466,7 +466,7 @@ func TestGuardianLoadResetsLegacyConsecutiveUserSessions(t *testing.T) {
|
||||
// user turn — consecutive user roles again. The post-review normalization must
|
||||
// keep the session strictly alternating across that fold.
|
||||
func TestGuardianSessionAlternatesAfterCompaction(t *testing.T) {
|
||||
prov := &scriptedProvider{defaultUsage: &provider.Usage{TotalTokens: 1}} // default allow verdict, also serves the summarizer
|
||||
prov := &scriptedProvider{defaultUsage: &provider.Usage{TotalTokens: 1}} // default allow verdict
|
||||
sink := &captureSink{}
|
||||
gs := NewSession(prov, tool.NewRegistry(), nil, PolicyPrompt(), "guardian-test", 0, nil, sink, nil)
|
||||
parent := sessionstore.NewSession("sys")
|
||||
@@ -484,9 +484,11 @@ func TestGuardianSessionAlternatesAfterCompaction(t *testing.T) {
|
||||
if len(events) != compactEvery {
|
||||
t.Fatalf("guardian events = %d, want %d", len(events), compactEvery)
|
||||
}
|
||||
// Compaction archives earlier turns to a file, so the compacting review
|
||||
// costs the one review request and no summarizer call.
|
||||
usage := events[len(events)-1].Guardian.Usage
|
||||
if usage == nil || usage.TotalTokens != 2 || usage.RequestCount != 2 {
|
||||
t.Fatalf("compacting review usage = %+v, want total=2 requests=2", usage)
|
||||
if usage == nil || usage.TotalTokens != 1 || usage.RequestCount != 1 {
|
||||
t.Fatalf("compacting review usage = %+v, want total=1 requests=1", usage)
|
||||
}
|
||||
for i := 1; i < len(msgs); i++ {
|
||||
if msgs[i].Role == msgs[i-1].Role {
|
||||
|
||||
Reference in new issue
Block a user