| 1 | package agent |
| 2 | |
| 3 | import ( |
| 4 | "testing" |
| 5 | |
| 6 | "reasonix/internal/event" |
| 7 | "reasonix/internal/provider" |
| 8 | "reasonix/internal/tool" |
| 9 | ) |
| 10 | |
| 11 | // Native provider context editing was removed. All providers use the local |
| 12 | // summary checkpoint path. These tests lock that contract so native flags and |
| 13 | // request-shape switches cannot reappear silently. |
| 14 | func TestNativeContextEditingRemoved(t *testing.T) { |
| 15 | a := New(nil, tool.NewRegistry(), NewSession("sys"), Options{ |
| 16 | ContextWindow: 100_000, |
| 17 | CompactRatio: 0.85, |
| 18 | ContextEditing: "native", // deprecated input; ignored |
| 19 | }, event.Discard) |
| 20 | // No native lineage suffix on the prompt cache key. |
| 21 | if key := a.currentPromptCacheKey(); key != a.currentPromptCacheKey() { |
| 22 | t.Fatal("prompt cache key unstable") |
| 23 | } |
| 24 | // ObserveUsage must never mutate the checkpoint. |
| 25 | a.contextManager().ObserveUsage(&provider.Usage{PromptTokens: 90_000}) |
| 26 | if got := a.currentProjectionVersion(); got != 0 { |
| 27 | t.Fatalf("ObserveUsage installed projection version %d", got) |
| 28 | } |
| 29 | } |
| 30 |