Skip to content

Conversation

robobun
Copy link
Collaborator

@robobun robobun commented Sep 4, 2025

Fixes #22392

Summary

Per @dylan-conway's guidance on issue #22392, this PR removes the document marker checks ( and ) from and in .

The Fix

Document markers should only be recognized at the start of a line in the main document flow, not within quoted strings where they should be treated as literal text. This PR:

  1. Removes the checks for document start () and document end () markers from within single-quoted and double-quoted string scanners
  2. Removes the now-unused and error types from both scanner functions

Testing

The fix ensures that strings like and are parsed as literal text rather than triggering document marker errors.

Note

There's a separate pre-existing issue where multiline quoted strings don't parse correctly in Bun's YAML implementation (they fail with "Expected character"), but that's beyond the scope of this fix and would require additional work on the YAML parser.

…d strings

Per Dylan's guidance on issue #22392, removed the document marker checks
(--- and ...) from scanSingleQuotedScalar and scanDoubleQuotedScalar.

Document markers should only be recognized at the start of a line in the
main document flow, not within quoted strings where they should be treated
as literal text.

Also removed the now-unused UnexpectedDocumentStart and UnexpectedDocumentEnd
error types from both scanner functions.

Note: There's a separate pre-existing issue where multiline quoted strings
don't parse correctly in Bun's YAML implementation, but that's beyond the
scope of this fix.

Fixes #22392
@robobun
Copy link
Collaborator Author

robobun commented Sep 4, 2025

Updated 12:56 AM PT - Sep 4th, 2025

❌ Your commit 940345da has 1 failures in Build #25012:


🧪   To try this PR locally:

bunx bun-pr 22397

That installs a local version of the PR into your bun-22397 executable, so you can run:

bun-22397 --bun

@github-actions github-actions bot added the claude label Sep 4, 2025
Copy link
Contributor

coderabbitai bot commented Sep 4, 2025

Walkthrough

The YAML parser’s quoted scalar scanning logic in src/interchange/yaml.zig was updated to remove document-boundary checks for '---' and '...'. Error variants and nl state handling related to detecting document start/end inside single- and double-quoted scalars were deleted.

Changes

Cohort / File(s) Summary
Quoted scalar scanning logic
src/interchange/yaml.zig
Removed UnexpectedDocumentStart/End from ScanSingleQuotedScalarError and ScanDoubleQuotedScalarError; deleted nl state variable usage and all checks treating '---'/'...' as document boundaries within single- and double-quoted scalar scanners.

Assessment against linked issues

Objective Addressed Explanation
Quoted scalars must not interpret '...' as document end or '---' as document start [#22392]

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ca8d806 and 940345d.

📒 Files selected for processing (1)
  • src/interchange/yaml.zig (0 hunks)
💤 Files with no reviewable changes (1)
  • src/interchange/yaml.zig
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/fix-yaml-document-end

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

YAML unexpected document end
1 participant