Repository navigation
Backlog
Description
Follow-up from the review of #607 at 2c016d7. These didn't block approval.
- Quote verification can accept dossier headings.
src/bigquery_agent_analytics/failure_judge.py:457filters patterns in the quote, then line 460 searches the whole formatted dossier, so a substring of a heading or cut annotation ("Final response", "the last invocation", "chars shown") can produceagreed, accepted=True. Only the first match is checked, so a real quote that also appears earlier in the session title is rejected. Record the ranges of original field values when rendering and match only inside them. - Endpoint classification by dot count (
failure_judge.py:833) sends a full HTTPS endpoint URL down theML.GENERATE_TEXTremote-model branch and drops the connection. A trailing dot with an empty model component passes validation. - Connection and endpoint strings are interpolated into SQL (
failure_judge.py:845-853) instead of being bound or validated as identifiers. The output schema handed to callbacks (line 648) is the same mutable object the SQL is built from, so a callback can change later queries. - Default
max_output_tokens=8192(failure_judge.py:806, emitted at line 774) exceeds the 4,096 limit for partner and open models on the remote-model path thatdocs/failure_diagnosis.md:53recommends. - Custom error event names (
session_dossier.py:432) go into the dossier without the one-line conversion and delimiter handling other fields get. - The repair prompt (
failure_judge.py:700) repeats reply-controlled text, e.g. the rejected category (line 516), in the instruction text after the previous-reply block. max_request_bytes(failure_judge.py:867) ignores key bytes and parameter overhead, and line 876 still sends a single prompt that exceeds it.- A user task stored only in
content_parts[].textrenders as "(no task text recorded)" (session_dossier.py:361). - A decoder
RecursionErroron one reply escapes the per-reply loop (failure_judge.py:692) and aborts the whole batch. - Batch sizing re-encodes the chunk on every addition (line 872), quadratic in requests per chunk.
- The renderer keeps every full step body alive even when they're all omitted (
session_dossier.py:200). - Family detection returns
Noneon an unknown alias before checking a known match (failure_diagnosis.py:251), and line 114 can infer a family from a project name. - Span-target agreement compares only
span_id(failure_diagnosis.py:224); equal ids in different traces report agreement. - The combiner doesn't check that
judge.labelbelongs to the same session as the result envelope (failure_diagnosis.py:185). - An ambiguous label can omit its runner-up and rationale (
failure_judge.py:510,:555) although the output schema requires them.
Metadata
Metadata
Assignees
Labels
No labels
Activity
fix(failure_judge): address GoogleCloudPlatform#607 review (quote ran…
caohy1988 commentedon Nov 30, 2026
Follow-up from the review of #607 at 42bc2f6. These don't block approval. Items below are in addition to 11 and 15, which are still open as listed above.
failure_judge.py:1008sizes raw SQL plus a fixed 8,192-byte allowance and:1027adds 256 bytes per element, but the client merges its default job configuration at dispatch (:1082). In my runs a 10,628-byte request was skipped under a 16,384-byte cap, and a client with a default external-table schema sent 26,140 bytes under a 20,000 cap. Size the final serialized body (with the effective job config) against the cap before dispatch. The committed oversized-request test doesn't compare the transport body, so it doesn't catch this.session_dossier.py:419joins text parts after dropping non-text parts and:438marks the whole joined string quotable.:542does the same for a decoded final response, including the producer's truncation suffix (trace.py:92). Citing[TRUNCATED]alone, or a phrase spanning the two sides of an omitted image, getsagreed, accepted=True. Keep separators and cut annotations outside the quotable ranges.session_dossier.py:404filters user messages by exact invocation ID and:405falls back to the first message in the session. If the current user row has no invocation ID (or none do), the earlier question gets paired with the current answer.trace.py:414-418already handles both cases for the response side.failure_judge.py:839-850accepts an incomplete resource path and allows arbitrary dots in a non-domain-scoped project (alpha.beta.gamma.deltabecomes remote SQL,projects/analyticsis accepted as an endpoint). The route and model ID are cached at:929/:952while the settings stay mutable. Whitespace is collapsed before zero-width characters are removed for the dossier but in the opposite order for the quote (:449vs:460), so"from \u200b ledger"is in the dossier yetverify_quotereturnsNone. Item 10 has no committed guard for repeated encoding. A test attests/test_failure_judge.py:786uses a fixture with two calls in the last invocation, so that parameter never measured a rejection.Status of the earlier items at this head: 1 is mostly fixed (see item 2 above for what remains), 2–6 and 12–14 look fixed, 7 is partial (item 1 above), 8–10 are fixed apart from the missing guard for 10, 11 and 15 remain.