fix(quality-loop): output options as YAML object instead of string#101
fix(quality-loop): output options as YAML object instead of string#101marcusquinn merged 1 commit intomainfrom
Conversation
The create_state function was outputting options as a quoted string
(e.g., options: "auto_fix=true") which caused OpenCode to fail parsing
the YAML frontmatter with "expected record, received string" error.
Now converts comma-separated key=value pairs to proper YAML object:
options:
auto_fix: true
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
WalkthroughThe quality-loop-helper script now properly converts comma-separated key=value configuration parameters into YAML format with appropriate type coercion, replacing direct string embedding. The script's state file path reference is also updated to reflect the new directory structure. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1).agent/scripts/*.sh⚙️ CodeRabbit configuration file
Files:
🧠 Learnings (1)📚 Learning: 2026-01-06T15:57:56.027ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (3)
✏️ Tip: You can disable this entire section by setting 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 |
Summary of ChangesHello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a critical issue preventing OpenCode from launching due to an invalid YAML configuration in Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Wed Jan 14 23:24:07 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
There was a problem hiding this comment.
Code Review
This pull request correctly fixes a YAML parsing issue by converting the options from a string to a YAML object in the state file. The approach of parsing the comma-separated key-value pairs is sound. I have one suggestion to improve the robustness of string handling by escaping special characters, which will prevent potential YAML validation errors for complex option values.
| if [[ "$value" == "true" || "$value" == "false" || "$value" =~ ^[0-9]+$ ]]; then | ||
| echo " $key: $value" | ||
| else | ||
| echo " $key: \"$value\"" |
There was a problem hiding this comment.
The current implementation for quoting string values is not fully robust. It will produce invalid YAML if an option's value contains a double quote (") or a backslash (\). This could lead to YAML parsing errors, similar to the issue this PR aims to resolve. To make the value handling more robust, you should escape backslashes and double quotes before wrapping the value in quotes.
| echo " $key: \"$value\"" | |
| value=${value//\\/\\\\} | |
| value=${value//\"/\\\"} | |
| echo " $key: \"$value\"" |
🤖 Augment PR SummarySummary: Fixes quality-loop state frontmatter by emitting 🤖 Was this summary useful? React with 👍 or 👎 |



Summary
optionsfield was output as a string"auto_fix=true"but OpenCode expects a YAML objectProblem
OpenCode failed to launch with error:
Solution
Changed
create_state()function to output:Instead of:
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.