fix: handle YAML indicator-prefixed values - #627
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughSession-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. ChangesSession YAML parsing
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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
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. Comment |
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.logandmain.old.logfor both malformed value shapes. A corpus regression also serializes all 42 trackedtest-datasession 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 indocs/ARCHITECTURE_REVIEW.md; it does not change the parse memoization architecture.Screenshots
Before
No visual change. Session parsing returned
nulland loggedYAMLException: bad indentation of a mapping entryfor indicator-prefixed values.After
No visual change. Indicator-prefixed driver and team names parse as their original string values.
Type of Change
Checklist
npm testnpm run lintand fixed any issuesSummary by CodeRabbit