Skip to content

[rollup] Preserve apply-patch existing-file newline style (fork #1 / upstream codex#4003)#3

Open
ctkm-aelf wants to merge 1 commit into
mainfrom
integration
Open

[rollup] Preserve apply-patch existing-file newline style (fork #1 / upstream codex#4003)#3
ctkm-aelf wants to merge 1 commit into
mainfrom
integration

Conversation

@ctkm-aelf

Copy link
Copy Markdown
Collaborator

Rollup: integration → main — Stage-1 autonomous consensus-loop result

Promotes the verified fix from integration to main for human review (this is the Stage-1 gate; ROLLUP_AUTO_MERGE=manual).

Source issue: fork #1 — mirrored from openai#4003 ("Patched files have mixed line endings on Windows").

Fix: preserve each file's existing newline style in apply-patch updates — detect LF vs CRLF from original contents, serialize with the original separator, LF fallback for LF-only/empty/mixed. Touches codex-rs/apply-patch/src/lib.rs + two byte-exact CRLF/LF scenario fixtures.

Pipeline that produced this:

  • Design-consensus: minimal + structural + delete solvers → meta-judge consensus: hybrid-A+B
  • Implement worker → gate: just fmt ✓, clippy -p codex-apply-patch ✓, nextest 84/84 ✓ (incl. the new CRLF/LF fixtures)
  • Cluster PR Preserve newline style in apply-patch updates #2 → review gate: architect / tests / quality all approve → squash-merged to integration (b67d66692)

Next (optional): the same verified fix is a strong candidate for Track-B upstream promotion to openai#4003 (root-cause analysis comment + diff, per their contribution funnel).

⟦AI:AUTO-LOOP⟧

Closes #1.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ctkm-aelf ctkm-aelf added the crnd:lifecycle:managed Item is managed by consensus-loop. label Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crnd:lifecycle:managed Item is managed by consensus-loop.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant