Skip to content

fix: handle YAML indicator-prefixed values - #627

Merged
tariknz merged 3 commits into
mainfrom
agent/fix-yaml-indicator-values
Jul 21, 2026
Merged

fix: handle YAML indicator-prefixed values#627
tariknz merged 3 commits into
mainfrom
agent/fix-yaml-indicator-values

Conversation

@tariknz

@tariknz tariknz commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Description

Fixes session YAML parsing when iRacing emits an unquoted scalar beginning with a YAML sequence indicator, such as TeamName: - BLACKSUIT - Catteam Agency.

The existing sanitizer handled anonymous driver names beginning with the mapping indicator ?, but not values beginning with -. The sanitizer now quotes both forms and limits structural whitespace matching to the current line so list entries cannot be consumed accidentally.

Added regression fixtures derived from irdashies.log and main.old.log for both malformed value shapes. A corpus regression also serializes all 42 tracked test-data session captures in iRacing-style one-line YAML and verifies that the production parser preserves each complete session object exactly. This is a correctness follow-up in the Phase 0.5 YAML parsing area described in docs/ARCHITECTURE_REVIEW.md; it does not change the parse memoization architecture.

Screenshots

Before

No visual change. Session parsing returned null and logged YAMLException: bad indentation of a mapping entry for indicator-prefixed values.

After

No visual change. Indicator-prefixed driver and team names parse as their original string values.

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Performance improvement
  • Refactoring (no functional changes)
  • Documentation update
  • Dependency update

Checklist

  • I have discussed this change in the discord server
  • I have tested this in iRacing (either in an online session or with AI)
  • All tests pass locally via npm test
  • I have added tests that prove my fix is effective or that my feature works
  • I have run npm run lint and fixed any issues
  • I have performed a self-review of my own code
  • I have added/updated Storybook stories for visual changes
  • I have updated the README.md (if applicable)
  • I have updated defaultDashboard.ts if introducing new widgets or configurations (if applicable)

Summary by CodeRabbit

  • Bug Fixes
    • Improved parsing of session data when driver or team fields include YAML special-character prefixes.
    • Ensured anonymous driver details are read correctly and that team names/car numbers are preserved.
  • Tests
    • Expanded regression coverage using multiple session-data fixtures, including edge-case scenarios for YAML parsing.

@tariknz
tariknz marked this pull request as ready for review July 21, 2026 07:18
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 81f6164f-6300-43c5-af32-b2ab02c72d71

📥 Commits

Reviewing files that changed from the base of the PR and between 61dab53 and a967582.

📒 Files selected for processing (1)
  • src/app/irsdk/node/irsdk-node.spec.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/app/irsdk/node/irsdk-node.spec.ts

📝 Walkthrough

Walkthrough

Session-data YAML sanitization now handles values beginning with mapping or sequence indicators. Tests add fixture round trips and regression coverage for anonymous driver names and indicator-prefixed team names.

Changes

Session YAML parsing

Layer / File(s) Summary
Indicator sanitization
src/app/irsdk/node/irsdk-node.ts
Replaces the mapping-only helper with indicator handling for scalar values beginning with ? or -, and applies it during session-data parsing.
Fixture and regression coverage
src/app/irsdk/node/irsdk-node.spec.ts
Round-trips session fixtures through YAML and tests anonymous driver names plus team names beginning with a YAML sequence indicator.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • tariknz/irdashies#625: Updates related session-data YAML sanitization and adds coverage for YAML-parsing edge cases.
  • tariknz/irdashies#554: Modifies the same session-data YAML preprocessing pipeline for multiline values.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main fix: handling YAML indicator-prefixed values.
Description check ✅ Passed The description follows the template and includes the change summary, screenshots, type, and checklist.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/fix-yaml-indicator-values

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


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.

❤️ Share

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

@tariknz
tariknz merged commit 2c77198 into main Jul 21, 2026
2 checks passed
@tariknz
tariknz deleted the agent/fix-yaml-indicator-values branch July 21, 2026 07:29
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