Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c5514d8
chore(store): move the extraction version to 23
sunerpy Oct 23, 2026
2a3dfde
fix(store): refuse an index a newer schema wrote
sunerpy Oct 23, 2026
e5a8695
test(mcp): give every engine test its own directory and remove it
sunerpy Oct 23, 2026
301a172
test(probes): std-typed Rust receivers stay unresolved
sunerpy Oct 23, 2026
98b7052
build(deps): bump the grammar crates held back from #334
sunerpy Oct 23, 2026
fc6b6d0
fix(store): uninit discards a current index beside its tombstone
sunerpy Oct 23, 2026
b80a14f
fix(store): report a newer schema before the uninit tombstone
sunerpy Oct 23, 2026
7160d9a
fix(store): offer uninit only where it would discard the index
sunerpy Oct 23, 2026
5cb5f32
fix(cli): status offers uninit for a newer schema only where it works
sunerpy Oct 23, 2026
fda96ed
test(cli): import the unix-only upgrade test types on unix only
sunerpy Oct 23, 2026
f699c78
feat(resolve): framework-edge infrastructure
sunerpy Oct 23, 2026
9ef9f69
feat(resolve): framework edges name their resolver
sunerpy Oct 23, 2026
9c84ead
fix(watch): any file that comes or goes re-reads the JS detection inputs
sunerpy Oct 23, 2026
80a5384
fix(react): hooks and contexts prefer own-file declarations and impor…
sunerpy Oct 23, 2026
86c3386
fix(nestjs): conventions stay in their feature; global prefix and ver…
sunerpy Oct 23, 2026
64b4f95
fix(vue): Nuxt routes only in Nuxt apps; a page route references its …
sunerpy Oct 23, 2026
e69a778
feat(explore): Flow section and branch guards
sunerpy Oct 23, 2026
608d5fd
fix(nestjs): a test's bootstrap configures only its own app
sunerpy Oct 24, 2026
ca35060
test(sync): framework edges keep their resolver's name under sync
sunerpy Oct 24, 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
39 changes: 20 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 64 additions & 1 deletion crates/codegraph-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2152,6 +2152,69 @@ fn cmd_status(path: Option<PathBuf>, json_output: bool) -> Result<()> {
}
return Ok(());
}
// A database a newer codegraph wrote (OD-19) is unreadable here, and
// nothing may write it; report which versions disagree instead of
// failing like a read.
Err(
error @ codegraph_store::StoreError::FutureSchema {
found,
supported,
discard_with_uninit,
..
},
) => {
if json_output {
let mut status = json!({
"initialized": false,
"version": VERSION,
"projectPath": project,
"indexPath": index_root,
"lastIndexed": null,
"dbPath": db,
"dbExists": db_exists,
"dbSizeBytes": db_size,
"extractionStatus": "current",
"extractionStatusDetail": error.to_string(),
"recoveryCommand": null,
"legacyIndexPresent": legacy_index_present,
"legacyIndexPaths": legacy_index_paths,
"daemonRunning": daemon_running,
"daemonPidPath": daemon_pid_path,
"daemonSocketPath": daemon_socket_path,
"daemonLogPath": daemon_log_path,
});
if wal_size > 0 {
status["walSizeBytes"] = json!(wal_size);
}
print_json(&status)?;
} else {
println!("\nCodeGraph Status\n");
println!("Project: {}\n", project.display());
println!(
"State: current (schema {found} is newer than this binary's {supported})"
);
println!("Index Statistics:");
println!(" DB Size: {:.2} MB", db_size as f64 / 1024.0 / 1024.0);
print_wal_status(wal_size, db_size);
println!("\n DB Path: {}", db.display());
println!(
" Daemon: {}",
if daemon_running { "running" } else { "stopped" }
);
if discard_with_uninit {
println!(
"\nRecovery: a newer CodeGraph wrote this index. Upgrade CodeGraph, or run `codegraph uninit --force {}` and then `codegraph init {}` to discard and rebuild it.",
project.display(),
project.display()
);
} else {
println!(
"\nRecovery: a newer CodeGraph wrote this index. Upgrade CodeGraph to use it."
);
}
}
return Ok(());
}
Err(error) => return Err(error.into()),
};
if status_open.rebuilding {
Expand Down Expand Up @@ -6506,7 +6569,7 @@ fn index_project_inner(
codegraph_watch::control_inputs::write_index_rows(
&store,
project,
&resolver.framework_names(),
&resolver.framework_signature(),
)?;
if resolver.has_framework_resolvers() {
let relative_files = store
Expand Down
20 changes: 20 additions & 0 deletions crates/codegraph-cli/tests/fixtures/upgrade_v0_55/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Index written by codegraph v0.55.2

`codegraph.db` is the database the released v0.55.2 binary (schema 10, extraction
version 22) wrote for `crates/codegraph-bench/fixtures/mini/`. The upgrade tests
open it with the current binary to prove that an index from the previous release
migrates: the outdated extraction version triggers one full rebuild.

Provenance:

- Binary: `codegraph 0.55.2` from `codegraph-0.55.2-x86_64-unknown-linux-musl.tar.gz`
(checked against the release's `SHA256SUMS` and `gh attestation verify`), sha256
`6c8f0093905b08d17848dfcc05b6d04f88256bca88a89186a71c052b6165d57c`.
- Command: `CODEGRAPH_NO_DAEMON=1 CODEGRAPH_NO_WATCH=1 codegraph init <copy of
crates/codegraph-bench/fixtures/mini>`, then `.codegraph/codegraph.db` copied
here.
- `codegraph.db` sha256:
`12cfc45a0c157873f75567fcd85d8ef0522eeead31bdfe2043513d9cecf16a0b`.

Do not regenerate it with a newer binary: its value is that an old release
wrote it.
Binary file not shown.
Loading
Loading