Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
0f2f518
feat(ingest): stamp every Agent Sessions aggregate and filter fact on…
JeremyFunk Sep 29, 2026
9e69e5a
feat(agent-sessions): ai_trace_index_mv projects the gateway's maple_…
JeremyFunk Sep 29, 2026
1c1c8bf
feat(agent-sessions): the detail page and /summary read the gateway's…
JeremyFunk Sep 29, 2026
4dc5db1
chore(ingest): name the stamp key table's entry type, point the stamp…
JeremyFunk Sep 29, 2026
7a763ea
docs(agent-sessions): point comments at the gateway's stamps instead …
JeremyFunk Sep 29, 2026
020f709
fix(agent-sessions): number the gateway-stamps view migration 0035
JeremyFunk Sep 29, 2026
3d15749
fix(agent-sessions): the prompt-cache check counts the gateway's cach…
JeremyFunk Sep 29, 2026
fabfe4d
fix(agent-sessions): the detail page names the agent the gateway named
JeremyFunk Sep 29, 2026
0410c4d
chore(agent-sessions): drop unread stamp keys, unexport in-file const…
JeremyFunk Sep 29, 2026
280f997
fix(agent-sessions): build the e2e gateway stamps without an open dic…
JeremyFunk Sep 29, 2026
a2552a6
test(agent-sessions): pin the stamp keys against the ingest gateway's…
JeremyFunk Sep 29, 2026
16ea933
fix(ingest): read a text fact of any OTLP type, as the warehouse Map …
JeremyFunk Sep 29, 2026
b0d0599
fix(ingest): stamp a reported $0 cost, so a free call is not read as …
JeremyFunk Sep 29, 2026
72dbc30
fix(ingest): saturate the cache sum, so an absurd customer figure can…
JeremyFunk Sep 29, 2026
7e9daf9
test(agent-sessions): hash the gateway's Rust sources into the stamp-…
JeremyFunk Sep 29, 2026
09ab4e9
test(agent-sessions): prove the gateway's failure verdict overrides a…
JeremyFunk Sep 29, 2026
38f256c
chore(agent-sessions): cut process notes and a duplicate test, rewrap…
JeremyFunk Sep 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions apps/cli/src/server/local-schema-history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,19 @@ export const LOCAL_SCHEMA_HISTORY: ReadonlyArray<LocalSchemaHistoryEntry> = Obje
manifestDigest: "005ad815cff50e1c642dfc696cf423d7d9a3c7ee58b8cdcd4ad647bf35ab1297",
projectRevision: "ed74788ef292834069e0ea6ee3b22d68fc604fb66cb54d2d551db67ce8d20b3a",
}),
Object.freeze({
// TODO(v26): what changed, whether any part is rewritten or any row
// moves, and what this edge does NOT backfill.
//
// projectRevision is carried forward deliberately: it is a hardcoded
// constant that no longer tracks the generator's header, and the identity
// this gate compares is the fingerprint/digest pair.
version: 26,
fingerprint: "203c87dde2b5aedc",
digest: "203c87dde2b5aedc28de3b2fd72829991b28fdf703bbb40ae72ebd835dbdb67c",
manifestDigest: "a3f69dea62db6610d63a6b2442f86d9071c91c286b5935e764700efc01fa7d7a",
projectRevision: "ed74788ef292834069e0ea6ee3b22d68fc604fb66cb54d2d551db67ce8d20b3a",
}),
] as const)

/** Immutable SQLite control DDL identities, checked by clickhouse:schema:check. */
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/src/server/local-schema-version.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Increment this value for every structural change to the generated local
// schema. The compatibility manifest and migration registry must be updated in
// the same change before a new value can ship.
export const LOCAL_SCHEMA_VERSION = 25 as const
export const LOCAL_SCHEMA_VERSION = 26 as const

/** SQLite eventing state has its own independent version sequence. */
export const LOCAL_CONTROL_SCHEMA_VERSION = 1 as const
26 changes: 26 additions & 0 deletions apps/cli/src/server/local-store-migrations/steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1114,5 +1114,31 @@ export const LOCAL_STORE_STEPS: ReadonlyArray<StepSpec> = [
},
],
},
{
id: "local-0025-to-0026-ai-trace-index-gateway-stamps",
from: 25,
to: 26,
description: "Recreate ai_trace_index_mv as a projection of the ingest gateway's maple_ai.* stamps",
clonedBefore: "any DDL runs",
beforeBootstrap: [dropViews("ai_trace_index_mv")],
plan: [
[
"rebuild-ai-trace-index-view",
"Rebuild ai_trace_index_mv to project the maple_ai.* facts the ingest gateway stamps on each span",
],
],
verifies: "Verify the v26 physical schema and the retained raw telemetry counts",
dispositions: [
AI_TRACE_INDEX_SOURCE,
{
name: "ai_trace_index",
classification: "derived",
disposition: "rebuild-within-retention-horizon",
guarantee:
"Existing rows are preserved untouched with the values the v25 view gave them; the rebuilt view fills spans materialized after the migration from the gateway's stamps, and the gap closes as the retention window rolls.",
...AI_TRACE_INDEX_FORWARD,
},
],
},
// local-schema:bump appends the next step above this line.
]
3 changes: 3 additions & 0 deletions apps/cli/src/server/schema-identity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import schemaV22Sql from "./schema/local-schema-v22.sql" with { type: "text" }
import schemaV23Sql from "./schema/local-schema-v23.sql" with { type: "text" }
import schemaV24Sql from "./schema/local-schema-v24.sql" with { type: "text" }
import schemaV25Sql from "./schema/local-schema-v25.sql" with { type: "text" }
import schemaV26Sql from "./schema/local-schema-v26.sql" with { type: "text" }
import { schemaDigest as digestSchema, schemaFingerprint as fingerprintSchema } from "./store-version"
import { buildLocalSchemaManifest, type LocalSchemaManifest } from "./schema-manifest"
import { LOCAL_SCHEMA_VERSION } from "./local-schema-version"
Expand Down Expand Up @@ -93,6 +94,7 @@ const SNAPSHOT_SQL: ReadonlyArray<string> = [
schemaV23Sql,
schemaV24Sql,
schemaV25Sql,
schemaV26Sql,
]

export interface LocalSchemaSnapshot {
Expand Down Expand Up @@ -175,6 +177,7 @@ export const LOCAL_SCHEMA_V22 = localSchemaIdentity(22)
export const LOCAL_SCHEMA_V23 = localSchemaIdentity(23)
export const LOCAL_SCHEMA_V24 = localSchemaIdentity(24)
export const LOCAL_SCHEMA_V25 = localSchemaIdentity(25)
export const LOCAL_SCHEMA_V26 = localSchemaIdentity(26)

export const CURRENT_LOCAL_SCHEMA: LocalSchemaIdentity = Object.freeze({
version: LOCAL_SCHEMA_VERSION,
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/src/server/schema/local-inserts.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"projectRevision": "92181b09631cc85a9bfc1ea57dc85000f3c6770b0799e5b357692f4634ce8042",
"projectRevision": "6f17e5994398bfddfebe6a99f13f097bbe822a95820cf6e0cb575082823d4f32",
"orgPlaceholder": "__ORG__",
"datasources": {
"traces": {
Expand Down
Loading
Loading