feat: cora affected + index --watch + call graph wiring (#267, #269)#283
Merged
Conversation
#269) #267 — cora affected: - Find test files affected by source changes - Strategy 1: reverse call graph traversal (changed symbols → callers in test files) - Strategy 2: naming convention (foo.rs → foo_test.rs, tests/foo.rs) - CLI: cora affected [files...] [--stdin] [--filter glob] [--json] - git diff --name-only | cora affected --stdin for CI pipeline - Runtime verified: src/main.rs → tests/cli_basic.rs + tests/config_loading.rs #269 — cora index --watch: - Poll-based auto-sync (2s interval, no extra deps) - Initial full index, then incremental re-index on file changes - Ctrl+C to stop - Real-time output of updated files Call graph edge extraction (wired to index pipeline): - extract_calls() in index/extract.rs: scope tracking + call site extraction - Reuses engine/context/extraction.rs symbol extraction - detect_function_entry() for Rust/Go/C/Java/Python scope tracking - is_builtin() filter to skip stdlib calls - Edges stored in call_graph table during index_file() - Runtime verified: cora callers execute_commit → 1 caller (main) cora impact open_index --depth 2 → 5 affected sites 552 tests pass, clippy clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three features in one PR
Call graph edge extraction (wiring)
Made
cora callersandcora impactactually work by extracting call edges during indexing.extract_calls()inindex/extract.rs: scope tracking + call site extractionengine/context/extraction.rsfor symbol reference detectiondetect_function_entry()for Rust/Go/C/Java/Pythonis_builtin()filter (skips 40+ stdlib names)call_graphtable duringindex_file()Runtime verified:
#267 —
cora affectedFind test files affected by source code changes.
cora affected src/main.rs src/index/mod.rs git diff --name-only | cora affected --stdin cora affected --jsonTwo strategies:
foo.rs→foo_test.rs,tests/foo.rs,foo.test.tsRuntime verified:
#269 —
cora index --watchAuto-sync file watcher (poll-based, no extra deps).
Tests