feat(agent-sessions): decide every aggregate/filter fact at ingest, the index projects the stamps - #1160
Merged
JeremyFunk merged 17 commits intoSep 29, 2026
Maple Review Bot / Maple / review
succeeded
Sep 29, 2026 in 7m 13s
Confidence 4/5 · No issues found
Confidence 4/5 · likely safe to merge
A deliberate behavior change: the span-name/model fallback for a model call now applies only to unknown: vendors, so known-vendor spans with an unrecognized op stop counting as LLM calls.
quality 100/100 · no findings · tests covered · risk medium
The ingest gateway now decides every Agent Sessions fact once per span and stamps it as maple_ai.*; ai_trace_index_mv becomes a projection of those stamps and the detail page reads the same verdicts. Contained and well tested; safe to merge once the ingest deploy ships first.
facts::stampswrites the gateway's verdicts, names and usage buckets on every stamped AI span- Migration 0035 recreates
ai_trace_index_mvas a projection ofmaple_ai.*pluserror.typeand the fingerprint classifyAiSpan/spanFailed/spanTokenBucketstake the gateway's verdicts for stamped spansgen-ai.test.tspinsMAPLE_AI_STAMP_ATTRSagainst the Rust key literals
Fixed since the last review
F1 · Nothing pins the Rust stamp keys toMAPLE_AI_STAMP_ATTRS
What was checked
- F1 resolved: every
MAPLE_AI_STAMP_ATTRSkey appears as a&str = "maple_ai..."literal infacts.rs/usage.rs, andturbo.jsonadds those sources as test inputs - The gateway's
error,tool_calland model/agent/tool key lists reproduce the old view expressions, soIsError/IsToolCall/Modeldo not shift for stamped spans - No new entrypoint, outbound call or background loop: the change is a transform inside the existing ingest path plus a view recreate, so no span or metric is owed
38f256c · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple to ask about one.
Loading