Skip to content

fix(agent-sessions): treat the GenAI memory operations as known ops - #1142

Merged
JeremyFunk merged 5 commits into
mainfrom
fix/agent-sessions-genai-memory-ops
Sep 30, 2026
Merged

JeremyFunk merged 5 commits into
mainfrom
fix/agent-sessions-genai-memory-ops

fix(warehouse): describe ai_trace_index columns as gateway-stamp proj…

f6836b9
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review completed Sep 30, 2026 in 3m 48s

Confidence 3/5 · 1 issue to address

🟡 Confidence 3/5 · needs attention
The summary-vs-page mismatch is fixed and tested, but the open finding that a memory span without gen_ai.operation.name still opens a turn stands unchanged in findAnchors.
quality 90/100 · 1 warning · tests covered · risk medium

This head adds AI_MEMORY_OPERATIONS to the summary query's unstamped llm-call exclusion, rewrites the ai_trace_index catalog notes around the ingest gateway's maple_ai.* stamps, and pins the change with a SQL test. The changed files are safe to merge; one earlier concern still stands.

  • aiSessionSummaryQuery excludes AI_MEMORY_OPERATIONS from the unstamped llm-call fallback
  • ai_trace_index catalog notes now describe the gateway's maple_ai.* stamps
  • New test pins memory ops out of the summary's llm-call rule

Still open from earlier reviews

Fixed since the last review

  • ✅ F3 · Memory ops read as agent on the page but stay llm calls in the session summary
What was checked
  • Memory exclusion reaches all three statements built from summaryMeasures_ (integrations.sql:820, 859, 953)
  • Migration 0035 on the base projects the maple_ai.* stamps the rewritten catalog notes describe (0035_ai_trace_index_gateway_stamps.ts:35)
  • The gateway's KNOWN_OPS already lists all seven memory ops (apps/ingest/src/ai_session/usage.rs:120)

f6836b9 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.