EditFlow: break Program eq cycle, reject multi-file diffs clearly#10
Merged
Conversation
- _program back-ref gets compare=False so it's not in __eq__ (avoids a Program<->EditFlow reference cycle) [S3-3] - parse_unified_diff raises a clear 'multi-file diffs aren't supported' error on a diff --git line instead of 'unrecognized diff line' [S3-7] Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Red-first against pre-fix main: a second "diff --git" section previously died on a confusing counts error, and comparing a Program to its id-preserving copy recursed through the EditFlow._program back-ref. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M7tEqGhaTqJV6ZxCXgMpFU
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.
Carries over the last unmerged fix from the old
feat/mcp-serverbranch (0138d76), which #9 missed:compare=FalseonEditFlow._program: the parent back-ref forms a Program↔EditFlow reference cycle, so the generated__eq__recurses infinitely when comparing a Program to an id-preserving copy (e.g. a deepcopy). Live in v0.6.0.diff --gitsection previously died on a confusing "beyond hunk header counts" error (and before Diff-apply hardening + drop dead mcp.allow_motion #9, was silently mis-consumed); now it's a clear "propose hunks for one file at a time". A single git-style file header before the first hunk still parses fine.Red-first tests (verified failing against pre-fix main); suite 89/89.
Release intent: tag v0.6.1 after merge. After this lands, the waldoctl
feat/mcp-serverbranch carries nothing unique and can be deleted (so WC PR #17's CI branch-matching falls back to the version pin instead of stale branch code).🤖 Generated with Claude Code
https://claude.ai/code/session_01M7tEqGhaTqJV6ZxCXgMpFU