You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1ba9750
Browse filesBrowse the repository at this point in the historyBrowse files
## Problem
Drift Tests run 38158387279 (main @ 9420afa) failed `k5-stream` with
`FAILURE / MAX_TOKENS / WIRE_OR_SDK_REJECTED`. Vertex streamed the known
interpreter anomaly as two chunks: a `google:python_interpreter` call,
then a `MAX_TOKENS` terminal with one empty text part. The suite only
accepted that anomaly in object mode. `k9-object` and `k9-stream` were
then `UNATTEMPTED` (`earlier-case-failed`), so we could not see their
live behavior.
## Live measurement (2026-10-11, llmock-drift-testing / us-central1 /
gemini-2.5-flash, exact drift request bytes)
| Case | n | Outcome | Count | Before | After |
|---|---|---|---|---|---|
| k5-object | 60 | interpreter anomaly, Tokyo | 29 | accepted | accepted
|
| k5-object | | interpreter anomaly, **London** | 1 | **rejected** |
accepted |
| k5-object | | MALFORMED_FUNCTION_CALL, `content: {}` | 30 | accepted |
accepted |
| k5-stream | 60 | two-chunk interpreter anomaly, Tokyo | 30 |
**rejected** | accepted |
| k5-stream | | two-chunk interpreter anomaly, **London** | 2 |
**rejected** | accepted |
| k5-stream | | MALFORMED_FUNCTION_CALL | 28 | accepted | accepted |
| k9-object | 20 | thought + visible text, MAX_TOKENS | 15 | accepted |
accepted |
| k9-object | | reasoning-only, MAX_TOKENS (target) | 5 | accepted |
accepted |
| k9-stream | 20 | thought + visible text + empty terminal | 18 |
accepted | accepted |
| k9-stream | | reasoning-only, MAX_TOKENS (target) | 2 | accepted |
accepted |
Before this change, k5-stream was rejected in 32 of 60 runs. After it,
all 161 captures are accepted (the 160 local captures plus the CI
capture).
## Changes (`src/__tests__/drift/vertex-misbehavior.drift.ts` only)
1. **Comparator, native leg only.** Accepts the stream interpreter
anomaly only in its observed shape, checked position by position: chunk
1 carries only the interpreter call, and chunk 2 is the `MAX_TOKENS`
terminal with exactly one `{text: ""}` part. Accepts the first-city
codes `Tokyo` and `London`, both observed live. The K5 prompt names no
cities (it asks for "200 distinct full city names"), so there is no list
to derive from the request. The accepted list comes from observation
only, and any other city is still rejected. The modeled leg stays
strict. Other terminals, function names, cities, args and call fields,
and any thought, non-empty or extra parts, are still rejected.
2. **Recurrence runner.** When the comparator rejects a complete HTTP
200, that case is recorded as `FAILURE` and the run continues to the
remaining cases. HTTP, transport and byte-bound failures still stop the
run. The per-case assertions and the 4-send / 160-token budget are
unchanged.
## Red / green
- **RED (before the fix):** the CI capture (sha256 `6c4382…87a5`) and
the London captures are rejected with `contradictory-target: K5 tool or
thought`, the same rejection as CI. The recurrence stopped after 2
requests. Result: 4 failed / 93 passed.
- **GREEN (after the fix):** 99 passed / 4 skipped (live-only).
- **Mutants that still fail:** the anomaly on the modeled leg; STOP and
SAFETY terminals; a non-interpreter name; the declared `archive` tool;
non-empty text; a thought part; an extra part; an unobserved city; an
extra arg; an extra call field; a second call; call and text merged into
one chunk; an empty first chunk with the call and text in the terminal;
the call and text in the first chunk with an empty terminal; the call in
the terminal with the text in the first chunk.
- **Positional check (review fix):** with the old position-blind check,
the empty-first-chunk and call-plus-text-in-first-chunk mutants were
accepted (2 failed). With the per-chunk check, all 102 pass, and
removing any one positional check fails at least one test. All 161 live
captures are still accepted.
- **Mutation testing:** each new guard was removed in turn, and at least
one test fails for each.
- **Live** (`AIMOCK_VERTEX_LIVE=1`, ADC token, same project): the file
passed 5 consecutive times, 103/103 each time. All 4 cases ran every
time, with none UNATTEMPTED. The stream anomaly was accepted live in
runs 3 and 4. After the positional fix, 2 more consecutive live passes
ran (106/106 each, all 4 cases run), and the stream anomaly was accepted
live in both.
## Gates
`pnpm typecheck`, `pnpm lint`, `pnpm format:check`, `pnpm build` and
`pnpm test` all pass (377 files, 14073 tests).
0 commit comments