From 7e8214d60a3c2765121da04f138c8a877f922eec Mon Sep 17 00:00:00 2001 From: yetone Date: Thu, 12 Nov 2026 00:17:02 +0800 Subject: [PATCH] tests: four reds on main from 85e6ec540, 5a475f90c and 0706d7a35 (#6187, #4457) - library: TestEveryAgentInLibrary. 85e6ec540 added the Paseo agent with no Library target; it is listed as "not looked at (#5897)" like the other new agents. - provider: TestAddSameKeyOtherFormat pinned OpenCode Go's Chat at /zen/go/v1. 5a475f90c moved it to /inference/go/openai/v1, the endpoint Go's docs name, and didn't run the package. - provider: TestQuotaSpanCarriesEveryWindowField. 0706d7a35 (#6160) put Lane on QuotaSpan; the test's full window now sets it too. - provider: TestKeptQuotaReportAsksNobody (#6187). The same commit gives a ChatGPT card an image row from what the gateway remembers, so the kept report has two windows; the test takes the image row and still asks that nothing is read. 0706d7a35 ran -run of its own tests only. Run (mica): all four red at origin/main fe20e4dbd; with this change ./internal/provider ok (125s) and ./internal/library ok (113s), -tags nogui -count=1. gofmt clean. --- internal/library/every_agent_test.go | 1 + internal/provider/provider_test.go | 2 +- internal/provider/quota_span_test.go | 2 +- internal/provider/remote_quotas_test.go | 4 +++- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/library/every_agent_test.go b/internal/library/every_agent_test.go index 55fb07518..aeba2c30f 100644 --- a/internal/library/every_agent_test.go +++ b/internal/library/every_agent_test.go @@ -48,6 +48,7 @@ var noLibrary = map[string]string{ "miniq": "not looked at (#5897)", "avibe": "not looked at (#5897)", "obsidian": "not looked at (#5897)", + "paseo": "not looked at (#5897)", "paimon": "not looked at (#5897)", "shelley": "not looked at (#5897)", "kun": "not looked at (#5897)", diff --git a/internal/provider/provider_test.go b/internal/provider/provider_test.go index 5fbad8e97..cac8da83b 100644 --- a/internal/provider/provider_test.go +++ b/internal/provider/provider_test.go @@ -166,7 +166,7 @@ func TestAddSameKeyOtherFormat(t *testing.T) { if err != nil { t.Fatalf("Go beside Zen, same key: %v", err) } - if p, err := Find(id); err != nil || p.Chat != "https://opencode.ai/zen/go/v1" { + if p, err := Find(id); err != nil || p.Chat != "https://opencode.ai/inference/go/openai/v1" { t.Fatalf("go: %+v %v", p, err) } if _, err := Add(gop); err == nil { diff --git a/internal/provider/quota_span_test.go b/internal/provider/quota_span_test.go index a083e8a9a..24aa796e3 100644 --- a/internal/provider/quota_span_test.go +++ b/internal/provider/quota_span_test.go @@ -89,7 +89,7 @@ func TestQuotaSpanCarriesEveryWindowField(t *testing.T) { at := time.Date(2026, 10, 30, 17, 0, 0, 0, time.UTC) bal := 6291.0 full := QuotaWindow{Balance: &bal, Unlimited: true, Name: "Credits", Used: 40, ResetsAt: &at, Display: "1 / 2", Text: true, Amount: 1, Limit: 2, Unit: "credits", - RunsOutAt: &at, RunsOut: 3, Pool: "P", Holds: &WindowHolds{}, HoldsWhy: "x", Spent: &bal, SpentSince: &at} + RunsOutAt: &at, RunsOut: 3, Pool: "P", Lane: "images", Holds: &WindowHolds{}, HoldsWhy: "x", Spent: &bal, SpentSince: &at} got := quotaReport([]SubscriptionQuota{{Provider: "p", Windows: []QuotaWindow{full}}}, nil, nil, at) b, _ := json.Marshal(got[0].Windows[0]) var m map[string]any diff --git a/internal/provider/remote_quotas_test.go b/internal/provider/remote_quotas_test.go index 80e617b32..617b2c3e9 100644 --- a/internal/provider/remote_quotas_test.go +++ b/internal/provider/remote_quotas_test.go @@ -288,7 +288,9 @@ func TestKeptQuotaReportAsksNobody(t *testing.T) { c.Unlock() }) qs := KeptQuotaReport(time.Now()) - if len(qs) != 1 || qs[0].Provider != "codex" || qs[0].Kind != "subscription" || len(qs[0].Windows) != 1 || qs[0].Windows[0].Used != 62 || qs[0].Windows[0].ResetsAt == nil { + // a ChatGPT card's image row (#6160, WithImageLane) is made from what + // the gateway remembers, not read + if len(qs) != 1 || qs[0].Provider != "codex" || qs[0].Kind != "subscription" || len(qs[0].Windows) != 2 || qs[0].Windows[0].Used != 62 || qs[0].Windows[0].ResetsAt == nil || qs[0].Windows[1].Lane != "images" { t.Fatalf("report: %+v", qs) } if SubscriptionUsageReading() {