Skip to content

Illiana draws cards and works in code mode; a turn no longer waits on SQLite - #1809

Merged
lbedner merged 1 commit into
mainfrom
illiana-cards-code-mode
Oct 23, 2026
Merged

lbedner merged 1 commit into
mainfrom
illiana-cards-code-mode

Conversation

@lbedner

@lbedner lbedner commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Fixes from a night of testing Illiana in chat and on calls.

Behaviour fixed

  • A turn waited 30 seconds on SQLite. Her app map (a memory module) asked whether the caller is an admin while the prompt's render held SQLite's write lock (BEGIN IMMEDIATE), and the lookup opened a second session, so every turn, typed or on a call, waited out the lock and went without the map. The render now settles who is asking before it opens its session; caller_is_admin is unchanged. This was also the silence on calls the voice model filled with "can you hear me?".
  • A pie card drew blank. A doughnut's legend items carry index, not datasetIndex, and the legend filter threw. Fixed as Steward fixed it (legendShows, legendPosition).
  • The trace paired results by tool name. Parallel calls to one tool finish in any order, so Overseer and the chat showed Auth's question with Documents' answer. Results are now matched by call id, and a drawn card rides the call that drew it.

Illiana

  • Cards: draw_card is in the default grant. Its description says when to draw and which kind (a kind asked for wins over the one the numbers pick), and that an error drew nothing, so she must fix it and call again. A table takes up to 50 rows, plus the value-only columns a model keeps writing. A card opened larger sits on the page's black.
  • Code mode, as the finance assistant: on for the default agent (PydanticAI with a database). The sandbox rules moved from the finance prompt to chat/code_mode.py and follow any agent's persona while code mode is on, in the prompt's stable head.
  • Persona: names errors, requests, storage and the Redis key families (ontology(kind="keys")), and gives a figure only from a tool she called for it. It was applied to a stored row only when that row still held the old default.

Tools

  • storage: the buckets, or one level of one. Registered with the storage component and granted.
  • query: one read-only statement through Overseer's Database > Query safeguards, audited. An admin's MCP client can opt in through MCP_TOOLS; no agent is granted it (per-domain aggregates replace free SQL for agents: Each domain says what it holds: typed aggregates an agent reads, never rows #1807). Both share db_query.attempt.

Observability

  • A live call logs who ended it (page, provider or error) and how long it ran. Tonight's drop was Gemini Live's 1011 Internal error.
  • A memory warning says how high: "Memory at 87% on ...".

Filed along the way

Copilot AI balanced review requested due to automatic review settings October 23, 2026 02:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Illiana's review of a5e0f1c

No new findings against the known debt.

What this change touches
  • Parts: service:ai, service:ai.chat, service:finance.detection, shared:system
  • Depended on by: service:documents, service:finance, service:meetings
  • In no part: 15 files

Earlier reviews

Illiana's review of `b0f3c13`

I wouldn’t merge this as it is: the shared dependency risks breaking the caller’s unit of work and can silently create a separate session when one is omitted. Since this shared code is depended on by document, finance, and meeting services, I’d fix the session ownership before merging.

Takes its session · service.takes-session · warn

This change opens a session inside a service that may already be running within a caller’s session. Have the caller provide the session so the work stays together.

  • app/services/shared/deps.py:99

Session is required · service.required-session · warn

The optional session lets a missing argument quietly take a different path. Make the session mandatory so callers must supply it explicitly.

  • app/services/shared/deps.py:99
What this change touches
  • Parts: service:ai, service:ai.chat, service:finance.detection, shared:shared, shared:system
  • Depended on by: service:documents, service:finance, service:meetings
  • In no part: 16 files

… SQLite

- Cards: the default agent is granted draw_card; its description says
  when to draw and which kind (a kind asked for wins), and that an error
  drew nothing. A table takes up to 50 rows and the value-only columns a
  model writes. A pie draws (the doughnut legend read a guide flag off
  datasets[undefined]); a card opened larger sits on the page's black.
- Code mode: on for the default agent (PydanticAI, with a database). The
  sandbox's rules moved out of the finance prompt into chat/code_mode.py
  and follow any agent's persona while its code mode is on.
- A turn waited 30 seconds on SQLite: the app map asked whether the
  caller is an admin inside the render's session, and the lookup opened
  a second one. The render settles who is asking before it opens its
  session.
- The trace matches a result to its call by id (parallel calls finish in
  any order), and a drawn card rides the call that drew it.
- A live call logs who ended it: the page, the provider, or an error.
- Tools: storage (the buckets, or one level of one; with the storage
  component, granted); query (one read-only statement, audited; MCP
  opt-in only), sharing db_query.attempt with Overseer's Database > Query.
- Her persona names errors, requests, storage and the Redis key families,
  and gives a figure only from a tool she called for it. A memory warning
  says how high.
@lbedner
lbedner force-pushed the illiana-cards-code-mode branch from b0f3c13 to a5e0f1c Compare October 23, 2026 03:00
@lbedner
lbedner merged commit fda6f39 into main Oct 23, 2026
48 checks passed
@lbedner
lbedner deleted the illiana-cards-code-mode branch October 23, 2026 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants