pub const SCHEMA_VERSION: i64 = 8;Expand description
On-disk schema version for the splayed baseline tables. Bump whenever any
table builder gains, loses, renames a column, or changes a column’s
physical type. The meta table stamps this value at save time; readers
refuse to decode mismatched baselines.
History:
- v1: initial schema, every string column stored as
RAY_STR. - v2: low-cardinality columns (
language,module,kind,resolution,severity,top_author) moved to dict-encodedRAY_SYMfor storage and load-time wins on large repos. - v3: architecture analysis materialized as first-class baseline
tables (
arch_cycles,arch_unstable,arch_foundations,arch_levels,arch_distance,arch_violations) so agents query architectural detail through Rayfall instead of by jq-piping a JSON dump from the typed MCP tools. - v4: trend history materialized as splayed tables
(
trend_health,trend_hotspots,trend_violations) so agents query “what got worse over the last N days” against the baseline instead of parsing.raysense/trends/history.jsonthemselves. - v5: trend tables become the source of truth. JSON
(
.raysense/trends/history.json) is gone.trend recordappends rows to the splayed tables in place via Rayfallconcat;baseline savereads them off disk and re-emits them rather than rebuilding from JSON. Hard break: v4 baselines fail the schema check and require a fresh save. - v6:
importstable gains analiascolumn capturingas-style renames (Rustuse foo::Bar as Baz, ESimport { foo as bar }, Pythonimport x as y). Empty string when no alias is declared. Hard break: v5 baselines fail the schema check and require a fresh save. - v7:
functionsandtypestables gain a normalizedvisibilitysymbol column (public,protected,internal,restricted,private,unknown) populated via per-pluginvisibility_patterns. Hard break: v6 baselines fail the schema check and require a fresh save. - v8: new
trait_implstable recordsimpl Trait for Typerelationships extracted from Rust sources, so blast-radius / coupling tooling can follow the trait -> implementer edge without round-tripping throughTypeFact.bases. Hard break: v7 baselines fail the schema check and require a fresh save.