Repository navigation
Backlog
Description
Follow-up from the review of #601 at 0e8e53b (merged). These are in addition to the findings already tracked from the earlier review.
- The taxonomy can credit a child agent's answer to its parent.
rule_taxonomy.py:526-543narrows the session to the latest raw invocation ID before callingtrace.final_response, which can drop the parent rows. The parent-presence check attrace.py:442then treats the child as a standalone run. Now thatAGENT_RESPONSEcounts as an answer event, this shows up even when the child produced noLLM_RESPONSE. Example: the parent makes a tool call and "The count is 42." appears only in the child'sAGENT_RESPONSE. The full trace returns None, but with reference answer 42 the taxonomy moves from FIN-NO-ANSWER at the merge base to FIN-IN-ANSWER. Resolving the run from the full session before narrowing the facts would fix it. - SQL ordering ties with the Python reader. When invocation IDs can't group rows,
trace.py:714usestimestamp > last_user_message. An ID-less answer at the same timestamp as the user message (span 002 after 001) is kept by the Python path and dropped by SQL, which returns NULL. The base kept it. Separately, the recency windows attrace.py:722-723order by timestamp only, so two tied model turns can resolve to different rows thanclient.py:432picks. Assigning a row position that follows the SDK's event order would fix both. Changing>to>=alone would admit answers that come before the message. - A non-string summary can override a real answer in SQL.
JSON_VALUEattrace.py:588turns JSON booleans and numbers into text, and line 614 gives that text priority onAGENT_RESPONSE. Python only promotes string summaries (line 309). With an answer of "Ready" and a summary offalse, Python returns "Ready" and SQL returns "false". - The legacy double-quoted text wrapper isn't recognized.
trace.py:168and the SQL call pattern at line 507 only handle the single-quoted opener. Fortext: "Checking." | call: search, both paths now return text that includes the tool call. The merge base returned None. The SQL strip at line 626 also leaves the double-quoted prefix in place where Python removes it. - The parser cache can hold large bodies. The cache at
trace.py:255is bounded by entry count only and keeps both the raw key and the extracted text. 256 distinct 64 KiB answers left about 32 MiB allocated after the traces were released. Skipping the cache for large inputs or capping retained bytes would fix this. - Small cleanup:
tests/test_final_response_sql.py:126still registers aLEFTshim. Removing it would make a reintroducedLEFT(fail on newer SQLite builds too.
Metadata
Metadata
Assignees
Labels
No labels
Activity