|
9 | 9 | "github.com/omnara-ai/omnara/internal/events" |
10 | 10 | "github.com/omnara-ai/omnara/internal/model" |
11 | 11 | "github.com/omnara-ai/omnara/internal/storage/executionstore" |
| 12 | + "github.com/omnara-ai/omnara/internal/storage/storeerr" |
12 | 13 | "github.com/stretchr/testify/require" |
13 | 14 | ) |
14 | 15 |
|
@@ -114,7 +115,7 @@ func TestRunnerReplansWhenPublishFindsUnsafeBoundary(t *testing.T) { |
114 | 115 | textCompactionEvent(1, strings.Repeat("first closed event ", 20)), |
115 | 116 | textCompactionEvent(2, strings.Repeat("second closed event ", 20)), |
116 | 117 | }, |
117 | | - publishErrs: []error{executionstore.ErrCheckpointBoundaryUnsafe}, |
| 118 | + publishErrs: []error{storeerr.ErrCheckpointBoundaryUnsafe}, |
118 | 119 | } |
119 | 120 | client := &summaryModel{results: []summaryResult{ |
120 | 121 | {response: completeSummaryResponse("Concise first summary.")}, |
@@ -307,8 +308,10 @@ func TestSafeCompactionSourceEndsRequireModelVisibleSemantics(t *testing.T) { |
307 | 308 | } |
308 | 309 |
|
309 | 310 | func TestRenderEventSourceReducesProjectionWithoutMutatingCanonicalOutput(t *testing.T) { |
310 | | - original := json.RawMessage(`[{"type":"structured_data","value":{"stdout":"` + strings.Repeat("x", 40_960) + |
311 | | - `TAIL"}}]`) |
| 311 | + original := json.RawMessage( |
| 312 | + `[{"type":"structured_data","value":{"stdout":"` + strings.Repeat("x", 40_960) + |
| 313 | + `TAIL"}}]`, |
| 314 | + ) |
312 | 315 | event := mustCompactionEvent(1, "tool_result", "completed", append(json.RawMessage(nil), original...)) |
313 | 316 | event.ToolName = "run_command" |
314 | 317 | event.ProviderCallID = "call_1" |
@@ -446,8 +449,10 @@ func TestCompactionAllowanceFitPrefersWholeTurnAndPreservesPartialProgress(t *te |
446 | 449 | }{ |
447 | 450 | {name: "whole turn fits reduced allowance", firstText: "short request", secondText: largeText, |
448 | 451 | firstKind: string(events.KindAgentInput), wantEnd: 2, wantReduced: true}, |
449 | | - {name: "oversized turn keeps preferred partial", firstText: "short request", secondText: largeText + largeText, |
450 | | - firstKind: string(events.KindAgentInput), wantEnd: 1}, |
| 452 | + {name: "oversized turn keeps preferred partial", |
| 453 | + firstText: "short request", |
| 454 | + secondText: largeText + largeText, |
| 455 | + firstKind: string(events.KindAgentInput), wantEnd: 1}, |
451 | 456 | {name: "oversized turn keeps reduced partial", firstText: largeText, secondText: largeText, |
452 | 457 | firstKind: string(events.KindModelOutput), wantEnd: 1, wantReduced: true}, |
453 | 458 | {name: "preferred whole turn wins", firstText: "small output", secondText: largeText, |
@@ -497,7 +502,10 @@ func (m summaryModelWithExplicitCapabilities) Capabilities() model.Capabilities |
497 | 502 | func TestCompactionRetainsOverflowLocator(t *testing.T) { |
498 | 503 | path := "/artifacts/art_overflow" |
499 | 504 | parts, err := json.Marshal([]map[string]any{ |
500 | | - {"type": "structured_data", "value": map[string]any{"path": path, "preview": strings.Repeat("x", 8192)}}, |
| 505 | + { |
| 506 | + "type": "structured_data", |
| 507 | + "value": map[string]any{"path": path, "preview": strings.Repeat("x", 8192)}, |
| 508 | + }, |
501 | 509 | {"type": "text", "text": strings.Repeat("other content", 5000)}, |
502 | 510 | }) |
503 | 511 | if err != nil { |
|
0 commit comments