Repository navigation
fix(flows): rematch incremental flows across node replacement - #673
helasaoudi wants to merge 6 commits into
Conversation
|
This is a useful lifecycle fix, but the four new focused tests are not enough for a 646-line stateful change. Path expansion uses suffix and SQL LIKE matching, yet there is no coverage for deleted or renamed entry points, different paths sharing a suffix, or literal % and _ in filenames. Please add those cases and prove incremental flow/community state matches a full rebuild before merge. |
|
Revalidated head After a full build creates a two-node community for an isolated file, deleting that file and running the incremental full-postprocess path leaves the old community row at Path expansion also uses unescaped SQL |
|
Revalidated head
Please rebase, capture deleted/renamed old paths before removal, use exact normalized or correctly escaped path matching, and add incremental-vs-clean-rebuild parity for flows, memberships, community rows, and node assignments. This head is not mergeable. |
98239a7 to
97caf68
Compare
|
Thanks for the detailed revalidation addressed on the latest head 97caf68 (rebased onto current main). Conflicts Deletion / rename lifecycle remap surviving community assignments by qualified name a_b.py no longer matches acb.py relative changed files without repo_root |
|
Verified head 97caf68 locally: the rebase resolved the incremental.py conflict, the full suite passes (2314 passed, 5 skipped, 2 xpassed), ruff is clean, and the #569 repro is fixed: incremental_trace_flows(store, ["b.py"]) now finds the flow when stored paths are absolute. Two items remain before merge.
Minor: incremental_update builds lifecycle_inputs variants that duplicate what expand_changed_file_paths already does, so paths are expanded multiple times per update, and clear_flows_for_files re-runs the node/flow ID queries that capture_affected_flow_entry_points just executed. Worth collapsing while you are in there. |
048061f to
6450e28
Compare
|
Thanks for the revalidation on 97caf68 — the two remaining items (plus the minor cleanup) are addressed on head 6450e28
Separator pattern is now a correctly escaped literal backslash: %\… under ESCAPE '' (f"%\\{escaped}" in Python). test_incremental_delete_clears_orphan_community_rows and test_incremental_rename_parity_with_full_rebuild now assert real equality of community assignments / signatures between the incremental store and a fresh full rebuild (no discarded clean_ids, no vacuous >= 0). incremental_update passes raw lifecycle inputs once through expand_changed_file_paths. |
|
Verified head 6450e28 against current main: merge is clean, full suite passes (2408 passed, 5 skipped, 2 xpassed), ruff is clean, and all ten new tests fail without the fix. Two items block merge.
Minor: the new helpers commit an ambient transaction before BEGIN IMMEDIATE while store_flows rolls back; pick one convention. |
|
Thanks for the revalidation on 1. mypy
2.
3. Minor: ambient transaction convention
Locally, the focused lifecycle/path-matching suites, mypy on the touched modules, and ruff on the changed files are green. Happy to follow up if anything still fails after CI on this head. |
|
Changes required: a failed replacement parse removes a valid existing flow while retaining its old nodes. With |
|
This no longer merges into git fetch origin && git merge origin/staging
# resolve, then
uv run pytest tests/ -q
uv run ruff check code_review_graph/
uv run mypy code_review_graph/ --ignore-missing-imports --no-strict-optional
git pushWhen resolving:
A large integration branch landed on PRs now target |
|
This no longer merges into
Worth knowing before you resolve:
git fetch origin
git merge origin/staging
# resolve, then
uv run pytest tests/ -q
uv run ruff check code_review_graph/
uv run mypy code_review_graph/ --ignore-missing-imports --no-strict-optional
git pushI have not reviewed the change itself yet. That comes once it merges and the checks run against the merged state, since staging has moved a long way and the result is what matters. |
Capture and clear affected flows before file node IDs churn, remap community assignments by qualified name, and normalize relative git paths against absolute graph file_path values. Fixes tirth8205#569
Add maintainer-requested lifecycle parity cases for tirth8205#569: relative paths without repo_root, underscore/percent filename literals, suffix collisions, deleted-community cleanup, and rename vs full-rebuild parity.
Escape the Windows backslash separator in expand_changed_file_paths so relative matches stay boundary-anchored (b.py no longer hits ab.py). Collapse duplicate lifecycle path expansion and flow ID queries, and assert real community-assignment equality vs a clean rebuild.
Align expand_changed_file_paths with tirth8205#774 so incremental matching uses the same file_path identity as the graph store after rebase onto main.
Avoid clearing nested same-basename flows during incremental updates, fix the mypy batch type reuse, and align ambient-transaction handling with store_flows rollback convention.
Cover the reviewer repro where a failed incremental parse must keep existing flow and node state until a later successful replacement.
bd17845 to
ab4d2d1
Compare
|
Addressed the latest review items on head Rebase / conflicts
Failed replacement parse
Local checks on the touched suites: 223 passed / 4 skipped; mypy clean on touched modules; ruff clean. Happy to follow up after CI on this head. |
ab4d2d1 to
7d825eb
Compare
Summary
file_pathvalues so new entry points are detectedFixes #569
Test plan
tests/test_flows.pyrelative-vs-absolute new entry point + replacement lifecycletests/test_incremental.pyend-to-end incremental flow lifecycletests/test_communities.pycommunity capture/remap regression143related tests passed locally)