wangb on Discord: 「请求存档开启, 但是 systemone 的请求没有记录下来」. The
Routing page then said "magpie 只保留最近 40 个请求的请求体和响应体… 要保留
每个请求的,请在「用量 › 请求」顶部打开「请求存档」", as if the archive
were off.
Why: only serve() made an archive wire (archiving). The two System One
paths never reached it:
- /v1/systemone, which an app sends (serveDecideTries, also used for a
decision group), opened a Route but recorded no Call. It was in
neither Recent calls nor the archive, so the Routing page could never
open its bodies.
- the question a routing group's Jev classifier asks for a turn
(askJev / jevLevelled -> systemOne -> postDecide) only appended a
usage row.
What changed:
- serveDecideTries captures its reply, makes the wire as serve does,
names it on the Route from the start (Route.Archive), and records a
Call (Route, status, error, fallbacks, usage, bodies) when it ends.
So the call is in Recent calls and, with the archive on, in the
archive. Its usage row carries Archive.
- systemOne keeps the call magpie made itself through a new
archiveOwn. It keeps the request as it went (method, path, the headers
magpie signed it with, the body in the provider's shape) and the
answer, with secrets scrubbed as for any call. Its "routing" usage
row names the archive entry. postDecide became postDecideSent, which
also returns the request it sent. archive's queueing moved into
queueArchive, which both share. archiveID makes the name.
- Routing's "Request and response" for a request in neither the ring
nor the archive: with the archive on (gateway.archive.on in
/api/providers) it says the archive is on and this request isn't in
it (made while it was off, or not saved). It no longer says to turn
the archive on. New string in zh, zh-TW, ja and de.
- docs/subsystems/gui-shell.md says which calls are archived and which
still aren't.
Still not archived (unchanged): Codex's own backend (codexUpstreamOn),
draw, embeddings and video side routes, and replies magpie writes
itself (answeredHere). Masking makes no outgoing call. Chat classifiers
and Codex titles to a model already go through serve and are archived.
Run on mote at base 4b407bb79, then rebased onto 0285f572f, whose one
commit changes only internal/gui/whatsnew*.go (nothing here reads it):
- TestArchiveKeepsSystemOne and TestArchiveKeepsJevClassifier (new)
pass. Broken by hand: with archiving(...) taken out of
serveDecideTries, the first is red ("uploaded []"). With archiveOwn
returning at once, the second is red (only the chat turn uploaded).
- routing-bodies.test.cjs, chromium and webkit, every language, 440px:
the new "archive on" case passes, and the archive-off case asserts
the old text. Against the old client.js the new case is red in all 5
languages (chromium). i18n-keys passes.
- gofmt -l clean. go vet ./... (darwin) and GOOS=windows go vet
./internal/gateway ./internal/gui are clean. GOOS=linux go vet
-tags nogui is also clean for both (without nogui, wails' linux cgo
doesn't build in a cross vet).
- go test ./internal/gateway: ok except TestCodexPoolSaysTheClientsVersion
(#4807: red in a whole package run on mote, passes alone).
- go test ./internal/gui (an earlier base, 834c6c7df): ok except
TestMainWindowCorners (#3949, macOS 27).
- The other routing-* GUI files (an earlier base, 834c6c7df): the whole
set was cut short when mote rebooted. Six files went red:
routing-many-keys, order-unknown, row-swap, rule-drag, rule-remove
and rules-line. Run alone they are red the same way at base
834c6c7df without this change (filed: #4082, #4627, #3799, #3789,
#3096, #4585).
Not tried: a real Jev or System One account. The tests use fake
System One servers. Not tried either: an S3 bucket (memBucket), the
local disk archive, or the GUI's whole suite.