Repository navigation
fix(agents): live round 9 (kept title request, localized to_long names, visible repair round, kept definition) - #12207
Conversation
…s, visible repair round, kept definition) - A plot request typed before .confirm() is kept through plot_pipeline (not_ready + request_kept) and reaches the adapter on the next .create_plot(); root.md says to call it and to claim "kept" only on request_kept. - .to_long() names its new columns in the session language (LONG_NAMES table, English fallback); the language route and every done return the recomputed offer and the page refreshes its card. - Round.defects (rubric ids) on rounds and the repairing status; the grid names rounds first/second try and shows "repairing <words>"; the result card says which round shipped when an earlier one won. - Review fixes of #12206: judged_view cap, one-language weekday sets, all snippets per line, center/levels restricted to colour-mapping calls, .to_long() keeps the user's bindings on kept columns. - Telemetry: kept = copy/download after the last run and no thumbs_down/bug; saved_session is no keep (states rejected, saved); the /debug card shows the counts behind both rates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
🟡 Changes recommended
The judge can exceed its character budget, and windowed telemetry can incorrectly count rejected sessions as kept.
2 open findings
What changed in this PR
This PR improves the admin agent chat’s request retention, localized data reshaping, repair progress, and usage reporting.
Changes:
- Preserves pre-confirmation plot requests and synchronizes localized
.to_long()offers. - Displays repair details and refines data judging, bindings, and readiness hints.
- Revises kept-session telemetry and shows the counts behind usage rates.
| File | Description |
|---|---|
| tests/unit/api/test_agent_usage.py | Tests usage counts and keep rules. |
| tests/unit/agents/runtime/test_stream.py | Tests suggestion events and payload limits. |
| tests/unit/agents/runtime/test_service_flow.py | Covers retained requests, localization, and repairs. |
| tests/unit/agents/runtime/test_dataset_versions.py | Tests preserved user bindings. |
| tests/unit/agents/runtime/test_dataset_judge.py | Tests capped value variants. |
| tests/unit/agents/data/test_shape.py | Tests localized names and weekday recognition. |
| tests/unit/agents/code/test_readiness.py | Tests color-scale hints and deduplication. |
| docs/reference/api.md | Documents updated response fields. |
| docs/reference/agent-telemetry.md | Defines revised session classifications. |
| docs/concepts/agent-network.md | Updates chat behavior documentation. |
| changelog.d/agent-live-round-9.md | Records fixes and behavior changes. |
| app/src/sections/debug/AgentUsageSection.tsx | Displays usage-rate counts. |
| app/src/sections/agent-chat/timeline.ts | Formats repair details and round labels. |
| app/src/sections/agent-chat/RoundGrid.tsx | Displays ongoing repair descriptions. |
| app/src/sections/agent-chat/ResultCard.tsx | Identifies the shipped round. |
| app/src/sections/agent-chat/ResultCard.test.tsx | Updates round-label expectations. |
| app/src/sections/agent-chat/ProgressTimeline.test.tsx | Tests repair descriptions and shipped-round labels. |
| app/src/pages/DebugPage.test.tsx | Tests usage-rate count display. |
| app/src/lib/agent.ts | Parses suggestions and defect identifiers. |
| app/src/hooks/useAgentSession.ts | Synchronizes localized offers. |
| app/src/hooks/useAgentSession.test.ts | Tests offer updates after language changes. |
| app/scripts/agent-bff-mock.mjs | Mirrors new stream and language fields. |
| api/routers/agent.py | Allows new event fields through the proxy. |
| api/agent_usage.py | Revises keep calculations and returns counts. |
| agents/telemetry/views/04_usage_failures.sql | Uses session classification for keep totals. |
| agents/telemetry/views/03_sessions.sql | Adds keep rules, rejection counts, and states. |
| agents/stream.py | Emits suggestions and repair identifiers. |
| agents/main.py | Recomputes offers in the session language. |
| agents/anyplot/tools/session.py | Localizes profile-tool offers. |
| agents/anyplot/schemas.py | Adds repair identifiers and request-retention status. |
| agents/anyplot/prompts/root.md | Routes unconfirmed plot requests through persistence. |
| agents/anyplot/plugins/tool_safety.py | Omits absent retention status. |
| agents/anyplot/pipeline.py | Reports retained requests and repair defects. |
| agents/anyplot/opening.py | Limits judged value variants. |
| agents/anyplot/dataset_versions.py | Carries user bindings alongside pinned roles. |
| agents/anyplot/data/shape.py | Localizes generated names and refines weekday detection. |
| agents/anyplot/code/readiness.py | Combines hints and narrows color-scale detection. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Prep eval for the root.md change (Claude Haiku 5.5, Vertex eu, 51 cases): 48 matched, exact 94.1 % (gate 80 %), 0 unavailable, 153 LLM calls, $0.11. PASS. |
…before the usage window Copilot review of #12207: the first values of later display copies could go over the judge's character budget, and a thumbs_down sent just before the card's window was not seen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M
… counted once, offer follows its language Gemini review of #12207 and owner decisions: - keep_plot_request keeps a first-plot request without a run (typed before .confirm(), or a wish in the pasted notes from the summary turn); root.md: only request_kept true allows a kept claim, in every path; .to_long() names are in the session language. - usage.sessions_kept counts a kept session once, under its last shipped run. - The card reads runs from the 2-day lookback for the sessions of the window. - The page applies a done's offer only together with the language it accepts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M
|
Prep eval after the second root.md change (keep_plot_request), head 78d04b5: Claude Haiku 5.5, Vertex eu, 51 cases, 50 matched, exact 98.0 % (gate 80 %), 0 unavailable, 158 LLM calls, $0.12. PASS. |

Summary
Live round 9 findings (2026-10-16) for the admin-only "Use with my data" chat, the Gemini review items of #12206, and the owner's telemetry rule for
kept..confirm()was lost (bar-grouped, filialen_qx7). The root said it had noted the title, but nothing kept it: the bare.create_plot()runsplot_pipelinewithout arguments.root.mdnow tells the root to callplot_pipelinewith the request on unconfirmed data too (it answersnot_readyandkeep_pending_requestkeeps it), and the result carries a root-onlyrequest_kept: true, the only basis on which the root may say a request is kept. Regression test: text turn on unconfirmed data → confirm →.create_plot()→ the adapter input carries the title and its expected text..to_long()names in the session language.shape.LONG_NAMESper language (en, de, fr, es, it, pt, nl, pl; English fallback). The paste, undo,to_long, profile tool, the language route (PUT /languagenow answerssuggestion) and every turn'sdone(suggestion, BFF allowlist extended) compute the offer in the current session language, and the page refreshes the card (suggestion_sync), so the card always names what the route applies. The user's own headers are never translated; collision handling is unchanged.Round.defects(closed rubric ids such asVQ-05) on every round and on therepairingstatus. The grid names roundsfirst try,second try, and so on, and a running repair round showsrepairing text size, layout. The result card sayssecond try, orfirst try shipped of 2when an earlier round won. Note: the r9 probe's regex matched onlyfirst try|second try|try \d, and the old label wasrepair 1, so part of the "invisible" finding was the label itself.judged_viewjudges at most 5 full values per display copy and 8,000 characters per column. The most frequent value of each copy is always judged.-feira) and Dutch are complete. Headers of two letters or fewer need 5 distinct days, soFR, SA, SOandMO, MI, MAstayCategory._couplingkeeps every flagged part of a line, joined. A part inside another flagged part counts once (theNormalize(...)call and its keywords).centeris flagged only on seabornheatmapandclustermap, andlevelsonly on contour calls.str.center(10)was never flagged (positional argument); a test pins that..to_long()with pinned bindings carries the user's bindings on the kept columns.kept(owner rule). A session is kept when the user copied or downloaded a result after the session's last run and sent nothumbs_downorbugfeedback.saved_sessionis never a keep. The view gets the new statesrejectedandsavedand the new columnssaves,rejectionsandkept. The header of03_sessions.sqlhas an example table. In04_usage_failures.sql,sessions_keptuses the view'skept. The/debugcard query uses the same rule and returnskept_sessions/shipped_sessionsandrepaired_runs/runs, and the card shows "5 of 12" under both rates.Decisions taken (documented in code):
Jour,Día,Giorno.request_keptis root-only. It is not part ofstream.PLOT_FIELDS.Plan
N/A
Test plan
uv run pytest tests/unit -n auto: 12,121 passedsecond try … repairing text size, layout, and the card header showssecond try. The offer card's language refresh is covered by a hook test, because the mock's specs have no.to_long()offer.root.mdchange: the result follows as a comment03_sessions.sqland04_usage_failures.sqlafter the merge.