Skip to content

EditFlow: break Program eq cycle, reject multi-file diffs clearly#10

Merged
Jepson2k merged 2 commits into
mainfrom
fix/editflow-eq-multifile
Jul 9, 2026
Merged

EditFlow: break Program eq cycle, reject multi-file diffs clearly#10
Jepson2k merged 2 commits into
mainfrom
fix/editflow-eq-multifile

Conversation

@Jepson2k

@Jepson2k Jepson2k commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Carries over the last unmerged fix from the old feat/mcp-server branch (0138d76), which #9 missed:

  • compare=False on EditFlow._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.
  • Multi-file diffs rejected explicitly: a second diff --git section 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-server branch 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

Jepson2k and others added 2 commits July 8, 2026 22:29
- _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
@Jepson2k
Jepson2k merged commit 3b5bae5 into main Jul 9, 2026
2 checks passed
@Jepson2k
Jepson2k deleted the fix/editflow-eq-multifile branch July 9, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant