Repository navigation
STA-1598: Handle CRLF project headers during Codex config repair - #8197
Merged
Merged
Conversation
Contributor
📝 WalkthroughWalkthroughUpdated Codex project header parsing to remove trailing carriage returns before processing. Added tests covering CRLF/LF interoperability, duplicate project table removal, project header deduplication, and propagation of an untrusted trust level. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
1 of 5 tasks
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
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.
Why this follow-up exists
This fixes a regression introduced by #8138 while addressing STA-1598.
The semantic project-header parser is used from two paths with different line shapes:
config.split('\n'), so a CRLF section header still ends in\rparseCodexProjectHeaderPathaccepted only spaces/tabs after the closing]. As a result, it rejected every CRLF project header supplied by the mirror. A Windows system config project section was copied as ordinary config, then the LF runtime-owned copy was appended, creating an exact duplicate table before Codex auto-started.This was reproduced on
1.4.135-rc.1.perf: the real runtime config contained 142 duplicated project-header groups. The two copies of the reported workspace differed only by the first header's terminal0x0Dcarriage return.Fix
Strip one terminal CR before parsing a project header. This aligns mirror parsing with the existing direct-upsert scanner without changing path values, quote handling, Windows/UNC normalization, SSH behavior, or hooks-state formatting.
Regression coverage
New end-to-end mirror tests cover:
untrustedrevocation overriding LF runtimetrustedAll three tests failed before the fix and pass afterward.
Evidence so far
pnpm typecheck: passedpnpm check:max-lines-ratchet: passedcodex features listparsed the healed copystartupTerminal.spawned = true); the rendered terminal showed the interactive Codex v0.144 prompt in the new workspace; afterward the seed project and new workspace each had one table, no duplicate groups remained, andcodex features listexited 0 against the healed runtimeReferences