Conversation
Three pre-existing failures surfaced by `cargo test --lib`, none of
which CI catches (CI only runs `cargo check --workspace`):
- `tree-sitter-scala 0.25` and `tree-sitter-swift 0.7` emit ABI-15
grammars, but the workspace pins `tree-sitter = "0.24"` (supports up
to ABI-14). Loading either grammar raised `LanguageError { version:
15 }`, breaking all 10 Scala/Swift extractor tests. Downgrade to the
last 0.24-compatible releases (0.24.1 / 0.6.0).
- `BuildSettings` derived `Default`, which gave `incremental: false`
via `bool::default()`. `BuildConfig::build` is `#[serde(default)]`,
so deserializing `{}` fell through to `BuildSettings::default()` and
disagreed with the `#[serde(default = "default_true")]` field
attribute. Implement `Default` manually so both paths agree.
Full suite now: 176 passed, 0 failed (was 165 passed, 11 failed).
docs check acknowledged — change is an internal grammar-crate
downgrade and a Default-impl bug fix; no user-facing API, language
support, or architecture change.
|
Claude finished @carlos-alm's task —— View job PR Review AnalysisConducting comprehensive review of cargo test fixes... Todo List:
Root Cause AnalysisProblem Being Solved: 11 pre-existing Why This Approach:
Risk Assessment: ✅ Low risk - Both fixes address root technical incompatibilities, not symptoms. The grammar downgrades are conservative (using last known-compatible versions) and the serde fix ensures consistency between Default and deserialization behavior. Backlog Compliance
Critical ConcernsNone - This is a clean technical fix addressing legitimate compatibility issues. Code Quality Observations:
Minor Suggestion: Consider the author's suggestion to add Final Recommendation
Suggested Follow-up: Add |
Greptile SummaryThis PR fixes 11 silently-rotted Confidence Score: 5/5Safe to merge — all three changes are correct, targeted fixes with passing test verification. All findings are P2 or below: the grammar downgrade is the correct ABI-compatible fix, the manual Default impl correctly aligns serde and Rust defaults, and the lockfile is consistent. No logic bugs, no security concerns, no regressions. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["BuildConfig deserialized from '{}'"] --> B{build key present?}
B -- "No (absent)" --> C["#serde(default) triggers\nBuildSettings::default()"]
B -- "Yes" --> D["Deserialize BuildSettings fields"]
C --> E["BEFORE: derive(Default)\nincremental = false ❌\ndrift_threshold = 0.0 ❌"]
C --> F["AFTER: manual Default impl\nincremental = default_true() = true ✅\ndrift_threshold = default_drift_threshold() = 0.1 ✅"]
D --> G["#serde(default = 'default_true')\nincremental = true ✅"]
D --> H["#serde(default = 'default_drift_threshold')\ndrift_threshold = 0.1 ✅"]
Reviews (1): Last reviewed commit: "fix(native): restore cargo test --lib gr..." | Re-trigger Greptile |
Codegraph Impact Analysis1 functions changed → 0 callers affected across 0 files
|
Summary
Fix 11 pre-existing
cargo test --libfailures incrates/codegraph-core. CI only runscargo check --workspace, so these rotted silently.tree-sitter-scala 0.25andtree-sitter-swift 0.7emit ABI-15 grammars, but the workspace pinstree-sitter = "0.24"(supports up to ABI-14). Loading either grammar raisedLanguageError { version: 15 }. Downgrade to the last 0.24-compatible releases:tree-sitter-scala 0.24.1,tree-sitter-swift 0.6.0.config::tests::deserialize_empty_config(1 test).BuildSettingsderivedDefault, which gaveincremental: falseviabool::default().BuildConfig::buildis#[serde(default)], so deserializing{}fell through toBuildSettings::default()and disagreed with the field-level#[serde(default = "default_true")]. Replace the derive with a manualDefaultimpl that matches the serde defaults.Result: 165 passed / 11 failed → 176 passed / 0 failed.
Test plan
cargo test --lib -p codegraph-core— 176 passed, 0 failedcargo check --workspace— clean (5 pre-existing warnings, unchanged)cargo test --libto.github/workflows/ci.ymlso these do not rot again