Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion apps/chat-bot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@maple-dev/effect-sdk": "workspace:*",
"@maple/backend": "workspace:*",
"@maple/chat-platform": "workspace:*",
"@maple/domain": "workspace:*",
Expand Down
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 @@ -368,6 +368,19 @@ export const LOCAL_SCHEMA_HISTORY: ReadonlyArray<LocalSchemaHistoryEntry> = Obje
manifestDigest: "560a5a62db3961c68d815eeab700525cb3a59df3a2aadcf84033417c76a87f0b",
projectRevision: "ed74788ef292834069e0ea6ee3b22d68fc604fb66cb54d2d551db67ce8d20b3a",
}),
Object.freeze({
// TODO(v30): 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: 30,
fingerprint: "5e8afdb803653665",
digest: "5e8afdb80365366551f730f44b42482c16d8f8923ba27060600ce4df1beec44a",
manifestDigest: "7fe927d0537e697ee7e9ad0c565c3294efee9e958d9894292afed234fbe560ab",
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 = 29 as const
export const LOCAL_SCHEMA_VERSION = 30 as const

/** SQLite eventing state has its own independent version sequence. */
export const LOCAL_CONTROL_SCHEMA_VERSION = 1 as const
30 changes: 30 additions & 0 deletions apps/cli/src/server/local-store-migrations/steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1223,5 +1223,35 @@ export const LOCAL_STORE_STEPS: ReadonlyArray<StepSpec> = [
},
],
},
{
// TODO(v29 -> v30): what changes, and what is NOT backfilled. Fill beforeBootstrap
// with the ADD COLUMN / view drops an IF NOT EXISTS bootstrap cannot do, then the
// plan line and dispositions. The v30 physical verify fails an unfinished row.
id: "local-0029-to-0030-error-fingerprint-v3",
from: 29,
to: 30,
description: "Rebuild the error-events views with fingerprint v3 grouping and a version-salted hash",
clonedBefore: "the views are replaced",
beforeBootstrap: [dropTables("error_events_mv", "error_events_by_time_mv")],
plan: [
[
"rebuild-error-events-views",
"Drop and recreate the error-events views so new occurrences are hashed with fingerprint v3",
],
],
verifies: "Verify the v30 physical schema and retained raw telemetry counts",
dispositions: [
TRACES_UNDER_REPLACED_VIEWS,
{
name: "error_events",
classification: "derived",
disposition: "preserve-exact",
guarantee:
"Existing rows keep their v2 FingerprintHash untouched; occurrences materialized after the migration carry v3 hashes, and the v2 rows age out with the retention window.",
...ERROR_RETENTION,
},
{ ...ERROR_EVENTS_BY_TIME_FORWARD_ONLY, disposition: "preserve-exact" },
],
},
// 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 @@ -28,6 +28,7 @@ import schemaV26Sql from "./schema/local-schema-v26.sql" with { type: "text" }
import schemaV27Sql from "./schema/local-schema-v27.sql" with { type: "text" }
import schemaV28Sql from "./schema/local-schema-v28.sql" with { type: "text" }
import schemaV29Sql from "./schema/local-schema-v29.sql" with { type: "text" }
import schemaV30Sql from "./schema/local-schema-v30.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 @@ -101,6 +102,7 @@ const SNAPSHOT_SQL: ReadonlyArray<string> = [
schemaV27Sql,
schemaV28Sql,
schemaV29Sql,
schemaV30Sql,
]

export interface LocalSchemaSnapshot {
Expand Down Expand Up @@ -187,6 +189,7 @@ export const LOCAL_SCHEMA_V26 = localSchemaIdentity(26)
export const LOCAL_SCHEMA_V27 = localSchemaIdentity(27)
export const LOCAL_SCHEMA_V28 = localSchemaIdentity(28)
export const LOCAL_SCHEMA_V29 = localSchemaIdentity(29)
export const LOCAL_SCHEMA_V30 = localSchemaIdentity(30)

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": "6946cd8703d07c0be3ef010ccbde01194cbfd3ac8e324dd6f36da99132a6fbba",
"projectRevision": "a9e17246b1cf0b92e8af1cb6a16606c9de70698233d82bb295231da6e22da702",
"orgPlaceholder": "__ORG__",
"datasources": {
"traces": {
Expand Down
Loading
Loading