fix(merge): hard-fail on non-empty unrecognized batch filenames (#641) - #655
Open
yiziff wants to merge 1 commit into
Open
fix(merge): hard-fail on non-empty unrecognized batch filenames (#641)#655yiziff wants to merge 1 commit into
yiziff wants to merge 1 commit into
Conversation
Prevent silent graph data loss by refusing to merge when fused/range batch files carry nodes or edges, while still warning on empty stubs. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
batch-existing.jsonis already accepted on main (via Fix incremental baseline batch merging #564); this PR addresses the remaining Incremental update: SKILL.md instructs writing batch-existing.json, but merge-batch-graphs.py silently drops it (all carried-over nodes lost) #641 suggestion: turn silent-ish drops of unrecognized batch filenames into a hard failure when those files carry nodes/edges.merge-batch-graphs.pynow refuses to writeassembled-graph.jsonif any unrecognizedbatch-*.json(e.g.batch-fused-*,batch-8-13.json) has content, exiting non-zero with a clear error.file-analyzer.mdso agents know bad filenames hard-fail instead of being silently dropped.Fixes #641
Test plan
PYTHONDONTWRITEBYTECODE=1 python -m unittest tests.skill.understand.test_merge_batch_graphs -v(81/81 pass)batch-existing.json+batch-<N>.jsonstill merges (unchanged)batch-fused-1-2.jsonintointermediate/and confirm merge exits non-zero with noassembled-graph.json