Skip to content

Conversation

@AmirTlinov
Copy link

Fixes #9828

Problem

  • Inline /* does not enter block-comment state, so header lines are missed.
  • /* ... */ code is misclassified as a header comment.

Solution

  • Track block-comment state per line when collecting indentation records.
  • Treat inline /* as starting comment state for subsequent lines, but not as a header itself.
  • Add two unit tests for the above cases.

Testing

  • just fmt
  • just fix -p codex-core
  • cargo test -p codex-core
  • cargo test --all-features (flaked once on read_file_tools_run_in_parallel; rerun passed)
  • cargo test --all-features -p codex-core --test all suite::tool_parallelism::read_file_tools_run_in_parallel

@etraut-openai
Copy link
Collaborator

There is already a PR posted for this issue: #9829.

@AmirTlinov AmirTlinov closed this Jan 26, 2026
@AmirTlinov AmirTlinov deleted the fix/read-file-block-comments branch January 26, 2026 09:22
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.

read_file: inline block comments misclassified

2 participants