Problem
oxidize crashes with no such table: co_changes when git history data isn't available. This happens when:
scrape git was never run
- Shallow clone detected and skipped
- New repo with insufficient commit history
Current Behavior
// temporal.rs:29 - crashes if table missing
conn.prepare("SELECT file_a, file_b, count FROM co_changes ...")?;
Error: no such table: co_changes
Proposed Fix
Add table existence check before querying:
// In oxidize, before querying co_changes:
let table_exists: bool = conn.query_row(
"SELECT EXISTS(SELECT 1 FROM sqlite_master WHERE type='table' AND name='co_changes')",
[],
|row| row.get(0)
)?;
if !table_exists {
println!("⚠️ Skipping temporal projection (no git history data)");
return Ok(vec![]); // Skip gracefully instead of crash
}
Additional Edge Cases to Handle
| Case |
Current |
Proposed |
| Table missing |
Crash |
Skip with warning |
| Table empty |
Bail |
Skip with warning |
| Few co-changes (count < 2) |
Bail |
Skip with warning |
| All single-file commits |
Empty pairs, bail |
Skip with warning |
Context
Discovered in PR #67 when CI failed due to shallow clone. Fixed CI with fetch-depth: 0, but oxidize should be resilient regardless of git history availability.
Labels
- enhancement
- good first issue
Problem
oxidizecrashes withno such table: co_changeswhen git history data isn't available. This happens when:scrape gitwas never runCurrent Behavior
Proposed Fix
Add table existence check before querying:
Additional Edge Cases to Handle
Context
Discovered in PR #67 when CI failed due to shallow clone. Fixed CI with
fetch-depth: 0, butoxidizeshould be resilient regardless of git history availability.Labels