Repository navigation
refactor(config): unify [[flow_rules]] into [[effect_rules]] - #52
hungpham10 merged 2 commits into
Conversation
Merge the control-flow marker config surface into the existing
[[effect_rules]] table so there is one config surface and one MCP tool
(codegraph_config_effects). FlowRule is deleted; EffectRule now carries
effect, marker, label, and keep_call (≥1 of effect/marker required).
- codegraph-core: EffectRule { effect: Option, marker, label, keep_call };
FlowMarker whitelist (try_start, try_end, catch_start, throw, if_true,
if_false, branch_end, loop, loop_back, break, continue, return);
keep_call defaults: throw=true, others=false.
- codegraph-extract: config CRUD/build_classifiers validate ≥1 dimension,
label only for throw|catch_start|if_true, keep_call only with marker;
legacy [[flow_rules]] ignored + warn; FlowClassifier::with_config(Vec<EffectRule>);
try/catch lifecycle uses Vec<TryPhase>{Body,Handler} stack (fixes nested
PG_TRY); branch_end does not touch try state.
- codegraph-mcp/graphql: dispatch_config_flow route removed; tool count 42;
response_tests assert updated.
- AGENTS.md: progressive disclosure root + docs/agent/{mcp-workflow,
conventions, testing, extraction, git-release}; .agents/AGENTS.md deleted;
mandatory verify+PR process (8 steps) added.
- Tests: merge flows_config.rs (5 tests) into effects_config.rs ported to
EffectRule/FlowClassifier::with_config; delete flows_config.rs; add CRUD,
validation, legacy-ignore, effect-none shadow, 4 flow-marker, and
branch_end-does-not-touch-try tests.
Clippy clean (-D warnings), fmt clean, cargo test --workspace green
(except 4 pre-existing storage::redis Connection-refused tests requiring a
running redis-server).
Co-authored-by: CodeGraph agent
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
MySQL rejects TEXT columns in PRIMARY KEY without a key length (error 1170: BLOB/TEXT column 'path' used in key specification without a key length). GraphIndex::open_route auto-creates sg_file_deps and sg_fn_ptr_assigns at runtime with path TEXT, which broke open_route on MySQL. Switch both tables to path VARCHAR(700) NOT NULL, matching the sql/mysql/001-initial-schema.sql migration (700 fits under InnoDB's 3072-byte index limit for utf8mb4). Postgres accepts TEXT in PK, so its runtime DDL is unchanged. Signed-off-by: CodeGraph agent
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (85.92%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #52 +/- ##
==========================================
+ Coverage 78.22% 80.04% +1.81%
==========================================
Files 96 97 +1
Lines 23490 28765 +5275
==========================================
+ Hits 18376 23026 +4650
- Misses 5114 5739 +625 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will not alter performance1 warning
Comparing |
Merge the control-flow marker config surface into the existing [[effect_rules]] table so there is one config surface and one MCP tool (codegraph_config_effects). FlowRule is deleted; EffectRule now carries effect, marker, label, and keep_call (≥1 of effect/marker required).
Clippy clean (-D warnings), fmt clean, cargo test --workspace green (except 4 pre-existing storage::redis Connection-refused tests requiring a running redis-server).
Co-authored-by: CodeGraph agent