Files
magpie/internal/sessions/testdata
yetone 1549ccf743 sessions: agy's and Antigravity's own calls carry their first-token time and duration (guyng35955 on X)
Usage → Requests showed agy's own calls with no time to the first
token, no duration and so no speed. Those calls don't go through the
gateway, which is where other calls are timed, and the readers of agy's
and the Antigravity app's conversations never read the step's times.

Each step's metadata row (exa.cortex_pb.CortexStepMetadata) has them:
1 created_at, 6 viewable_at, 7 finished_generating_at. A model step is
created as its request goes out, so 6 less 1 is the time to the first
token and 7 less 1 the call's duration (stepTimesOf). A response that
two steps share is timed from the first step's start to the last's end.
A step with no end, or times out of order, has none (unknown, not 0).
agy and antigravity call-cache versions go to 2 so cached shards are
read again.

Checked with real agy 1.5.9 in a sandbox HOME against a fake Gemini
endpoint that held its first chunk 2.01s and ended at 4.03s: the row
said 2014ms and 4032ms. That row and transcript are the new fixture
(testdata/agy-times).

Run:
- TestAgyCallsCarryTheirTimes, TestAntigravityAppCallTimes,
  TestAntigravityAppOneResponseTimedWhole, TestStepTimesUnknown: red
  on the old readers (all 0ms), green on these (mote).
- go vet ./internal/sessions ./internal/usage, GOOS=linux and
  GOOS=windows go vet ./internal/sessions, gofmt -l: clean (mote).
- go test -count=1 -timeout 45m ./internal/sessions ./internal/usage:
  ok (mote, at 31dcfcc33).

Not run here: the full suite (running after the push) and the GUI suite
(no GUI change). Not tried: a real agy call to Google (the local
account is refused), so the times rest on the fake endpoint's run.
Seven other agents' own calls have the same gap: #6940.
2026-11-17 15:39:43 +08:00
..