Tests: the fixtures' subagent facts replace the guess they asserted
CI / check (push) Canceled after 0s

gpt-oss serves one request at a time and is now offered subagents for a named model;
auto-compact counted by the app is tested without the server's own count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
HomerandClaude Opus 5.5 committed 2026-11-09 17:17:52 +00:00
1 parent 9257238735
commit 90f8980053
2 files changed
+8 -4

No files matched your search

@@ -47,7 +47,9 @@ class ActivityTest {
assertEquals("low", gptOss.level("low"))
// A level the model does not offer (an `off` from before) reads as its start level.
assertEquals("high", gptOss.level("off"))
assertFalse(gptOss.mayHaveTeam)
// One request at a time: offered all the same, for a model the person names (server 3.3.0 rule).
assertTrue(gptOss.mayHaveTeam)
assertTrue(gptOss.subagents!!.namedOnly)
assertNull(gptOss.image)
assertEquals("none", vision.levelControl)
@@ -149,8 +151,8 @@ class ActivityTest {
@Test
fun autoCompactIsCountedOnlyAgainstAKnownWindow() {
val context = read("activity", ActivityEnvelope.serializer()).activity.context!!
// 95 % of 128k is 121.6k; 41k used.
// The app's own count, without the server's: 95 % of 128k is 121.6k; 41k used.
val context = read("activity", ActivityEnvelope.serializer()).activity.context!!.copy(autoCompact = null, untilCompact = null)
assertEquals(80_600, ActivityLogic.untilAutoCompact(context))
assertEquals(0, ActivityLogic.untilAutoCompact(context.copy(used = 127_000)))
assertNull(ActivityLogic.untilAutoCompact(context.copy(threshold = 0)))
@@ -47,7 +47,9 @@ class ChatStateTest {
fun aTeamIsOfferedByTheServerOrGuessedForANewChat() {
assertTrue(ChatState(models = models).offersTeam(agent = false))
assertFalse(ChatState(models = models).offersTeam(agent = true))
assertFalse(ChatState(models = models, draft = Draft(model = "gpt-oss")).offersTeam(agent = false))
// gpt-oss serves one at a time: offered, for a model named in the chat; vision-small not at all.
assertTrue(ChatState(models = models, draft = Draft(model = "gpt-oss")).offersTeam(agent = false))
assertFalse(ChatState(models = models, draft = Draft(model = "vision-small")).offersTeam(agent = false))
assertTrue(ChatState(models = models, chat = Chat(id = "c", model = "gpt-oss"), teamOffered = true).offersTeam(agent = false))
assertEquals(AgentsSetting(2, 6), ChatState(draft = Draft(agents = AgentsSetting(2, 6))).agents)
}