Skip to content

Commit ce75617

Browse files
committed
release schema v18 compatibility
1 parent d9769ca commit ce75617

38 files changed

Lines changed: 146 additions & 2471 deletions

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ All notable changes to Mirage are documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.8.2] - 2026-06-20
9+
10+
### Fixed
11+
12+
- **Magellan schema v18 compatibility verification**:
13+
- Added regression coverage proving `MirageDb` opens a Magellan schema-18 database cleanly.
14+
- Verified live analysis commands against the current unified Magellan database after the temporal schema rollout.
15+
16+
### Changed
17+
18+
- **Release docs refresh**:
19+
- Updated README and manual requirements to reflect current Magellan schema support and removed stale 4D-coordinate migration guidance from the public path.
20+
821
## [1.8.1] - 2026-06-20
922

1023
### Added
@@ -28,6 +41,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2841
- CFG/status compatibility cleanup:
2942
- `DatabaseStatus.cfg_edges` remains a normal compatibility field for Magellan-backed status output instead of being marked deprecated while still in active use.
3043
- Legacy in-memory `coord_*` fields are now documented as analysis-time values, not persisted database columns.
44+
- Dynamic schema version alignment:
45+
- Updated `REQUIRED_SQLITEGRAPH_SCHEMA_VERSION` to dynamically reference `sqlitegraph::schema::SCHEMA_VERSION as i32` instead of hardcoding `3`, aligning with sqlitegraph v3.3.1 (schema v6).
3146
- Source hygiene cleanup:
3247
- Removed a dead AST CFG builder field and cleaned up stale doctest placeholders that used `unimplemented!()`.
3348
- Replaced stale wording that implied temporary or 4D-backed behavior where Mirage now only reads Magellan-managed CFG data.

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mirage-analyzer"
3-
version = "1.8.1"
3+
version = "1.8.2"
44
edition = "2021"
55
rust-version = "1.70"
66
authors = ["Mirage Contributors"]

MANUAL.md

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Mirage User Manual
22

3-
Version 1.8.0
3+
Version 1.8.2
44

55
---
66

@@ -42,44 +42,26 @@ cargo install --path .
4242

4343
### Requirements
4444

45-
- **Magellan 3.3.3+ / Schema v14** (or v11+ for basic CFG, v13+ for source documents)
46-
- For CFG extraction and 4D spatial coordinates
45+
- **Magellan SQLite `.db` database**
46+
- Current release verified with Magellan schema v18
47+
- Minimum CFG-compatible Magellan schema remains v7
4748
- Run `magellan watch --root ./src --db .magellan/mirage.db` first
4849
- **Rust 1.70+**
4950

50-
### Magellan v10 → v11 Migration
51+
### Magellan Schema Compatibility
5152

52-
If you're upgrading from Magellan v10 to v11, follow these steps:
53+
Mirage reads Magellan-managed CFG data and does not require Magellan's temporal tables directly, but it is verified to open current schema-v18 databases cleanly.
5354

5455
```bash
55-
# 1. Check your current Magellan schema version
56+
# Check the embedded Magellan schema version
5657
mirage status --db .magellan/mirage.db
57-
# Look for: "Schema version: 1 (Magellan: X)"
58+
# Example: "Schema version: 1 (Magellan: 18)"
5859

59-
# 2. If it shows v10 or earlier, rebuild your Magellan database
60+
# If the database is too old, rebuild it with current Magellan
6061
rm .magellan/mirage.db
6162
magellan watch --root ./src --db .magellan/mirage.db --scan-initial
62-
63-
# 3. Verify the new schema
64-
mirage status --db .magellan/mirage.db
65-
# Should show: "Schema version: 1 (Magellan: 11)"
66-
67-
# 4. Clear old path caches (they use function_hash, v11 uses cfg_hash)
68-
# This is automatic - Mirage will rebuild caches on first run
69-
mirage paths --function "some_function" --db .magellan/mirage.db
70-
71-
# 5. Verify 4D coordinates are available
72-
mirage cfg --function "main" --output json --db .magellan/mirage.db | jq '.data.blocks[0]'
73-
# Should include: coord_x, coord_y, coord_z, coord_t
7463
```
7564

76-
**What changed in Magellan v11:**
77-
- Added `coord_t` column for temporal/type metadata
78-
- Changed from `function_hash` to `cfg_hash` for cache invalidation
79-
- Better cache invalidation when CFG structure changes
80-
81-
**Backward compatibility:** Mirage 1.2.4+ works with both v10 and v11 databases, but v11 is recommended for the full 4D coordinate experience.
82-
8365
### Full Workflow Setup
8466

8567
For the complete code intelligence workflow:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Crates.io](https://img.shields.io/crates/v/mirage-analyzer)](https://crates.io/crates/mirage-analyzer)
44
[![Documentation](https://docs.rs/mirage-analyzer/badge.svg)](https://docs.rs/mirage-analyzer)
55

6-
**Version:** 1.8.0
6+
**Version:** 1.8.2
77

88
Path-aware code intelligence engine for Rust. Analyzes control-flow graphs from Magellan databases.
99

@@ -58,7 +58,7 @@ cargo install mirage-analyzer --features backend-geometric --no-default-features
5858

5959
## Requirements
6060

61-
- **[Magellan](https://github.com/oldnordic/magellan)** 3.3.3+ / Schema v14 (or v11+ for basic CFG, v13+ for source documents)
61+
- **[Magellan](https://github.com/oldnordic/magellan)** SQLite `.db` databases with schema v18 support (minimum CFG-compatible schema remains v7)
6262
- Rust 1.70+
6363
- Magellan database (`.db`) created by `magellan watch`
6464

src/cfg/analysis.rs

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ mod tests {
8383
statements: vec![],
8484
terminator: Terminator::Goto { target: 1 },
8585
source_location: None,
86-
coord_x: 0,
87-
coord_y: 0,
88-
coord_z: 0,
8986
});
9087

9188
// Block 1: if statement, goes to 2 (true) or 3 (false)
@@ -99,9 +96,6 @@ mod tests {
9996
otherwise: 3,
10097
},
10198
source_location: None,
102-
coord_x: 0,
103-
coord_y: 0,
104-
coord_z: 0,
10599
});
106100

107101
// Block 2: true branch, returns
@@ -112,9 +106,6 @@ mod tests {
112106
statements: vec![],
113107
terminator: Terminator::Return,
114108
source_location: None,
115-
coord_x: 0,
116-
coord_y: 0,
117-
coord_z: 0,
118109
});
119110

120111
// Block 3: false branch, returns
@@ -125,9 +116,6 @@ mod tests {
125116
statements: vec![],
126117
terminator: Terminator::Return,
127118
source_location: None,
128-
coord_x: 0,
129-
coord_y: 0,
130-
coord_z: 0,
131119
});
132120

133121
// Add edges
@@ -217,9 +205,6 @@ mod tests {
217205
otherwise: 2,
218206
},
219207
source_location: None,
220-
coord_x: 0,
221-
coord_y: 0,
222-
coord_z: 0,
223208
});
224209

225210
let b1 = g.add_node(BasicBlock {
@@ -229,9 +214,6 @@ mod tests {
229214
statements: vec![],
230215
terminator: Terminator::Goto { target: 3 },
231216
source_location: None,
232-
coord_x: 0,
233-
coord_y: 0,
234-
coord_z: 0,
235217
});
236218

237219
let b2 = g.add_node(BasicBlock {
@@ -241,9 +223,6 @@ mod tests {
241223
statements: vec![],
242224
terminator: Terminator::Goto { target: 3 },
243225
source_location: None,
244-
coord_x: 0,
245-
coord_y: 0,
246-
coord_z: 0,
247226
});
248227

249228
let b3 = g.add_node(BasicBlock {
@@ -253,9 +232,6 @@ mod tests {
253232
statements: vec![],
254233
terminator: Terminator::Return,
255234
source_location: None,
256-
coord_x: 0,
257-
coord_y: 0,
258-
coord_z: 0,
259235
});
260236

261237
g.add_edge(b0, b1, EdgeType::TrueBranch);
@@ -284,9 +260,6 @@ mod tests {
284260
unwind: Some(2),
285261
},
286262
source_location: None,
287-
coord_x: 0,
288-
coord_y: 0,
289-
coord_z: 0,
290263
});
291264

292265
// Block 1: normal return
@@ -297,9 +270,6 @@ mod tests {
297270
statements: vec![],
298271
terminator: Terminator::Return,
299272
source_location: None,
300-
coord_x: 0,
301-
coord_y: 0,
302-
coord_z: 0,
303273
});
304274

305275
// Block 2: unwind exit
@@ -310,9 +280,6 @@ mod tests {
310280
statements: vec![],
311281
terminator: Terminator::Abort("panic".to_string()),
312282
source_location: None,
313-
coord_x: 0,
314-
coord_y: 0,
315-
coord_z: 0,
316283
});
317284

318285
g.add_edge(b0, b1, EdgeType::Call);
@@ -340,9 +307,6 @@ mod tests {
340307
statements: vec![],
341308
terminator: Terminator::Return,
342309
source_location: None,
343-
coord_x: 0,
344-
coord_y: 0,
345-
coord_z: 0,
346310
});
347311

348312
// A single block that is both entry and exit
@@ -362,9 +326,6 @@ mod tests {
362326
statements: vec![],
363327
terminator: Terminator::Goto { target: 1 },
364328
source_location: None,
365-
coord_x: 0,
366-
coord_y: 0,
367-
coord_z: 0,
368329
});
369330

370331
// Block 1: normal path
@@ -375,9 +336,6 @@ mod tests {
375336
statements: vec![],
376337
terminator: Terminator::Return,
377338
source_location: None,
378-
coord_x: 0,
379-
coord_y: 0,
380-
coord_z: 0,
381339
});
382340

383341
// Block 2: unreachable (dead code)
@@ -388,9 +346,6 @@ mod tests {
388346
statements: vec![],
389347
terminator: Terminator::Unreachable,
390348
source_location: None,
391-
coord_x: 0,
392-
coord_y: 0,
393-
coord_z: 0,
394349
});
395350

396351
g.add_edge(b0, b1, EdgeType::Fallthrough);

src/cfg/ast.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,6 @@ impl<'a> CFGBuilder<'a> {
210210
statements: statements.iter().map(|n| self.node_text(*n)).collect(),
211211
terminator: self.extract_terminator(statements),
212212
source_location,
213-
// AST-based CFG doesn't compute spatial coordinates (use 0 defaults)
214-
coord_x: 0,
215-
coord_y: 0,
216-
coord_z: 0,
217213
};
218214

219215
let node_idx = self.graph.add_node(basic_block);

0 commit comments

Comments
 (0)