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.
This commit is contained in:
yetone
2026-11-12 00:17:30 +08:00
parent 7b9ae7cf9c
commit 7e8214d60a
4 changed files with 6 additions and 3 deletions
+1
View File
@@ -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)",
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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
+3 -1
View File
@@ -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() {