fix: pre-dispatch check matched [x] in task description, not checkbox (t290)#1132
fix: pre-dispatch check matched [x] in task description, not checkbox (t290)#1132marcusquinn merged 1 commit intomainfrom
Conversation
… (t290) is_task_already_complete() used '=~ \[x\]' which matched [x] anywhere in the line, including task descriptions that mention '[x]'. Now extracts only the checkbox character from the line-start pattern using sed.
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 addresses a critical bug in the task completion detection logic. Previously, the system would misinterpret tasks as completed if their descriptions happened to contain the string Highlights
Changelog
Activity
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
|
WalkthroughRefines task-completion detection in the supervisor helper script by improving TODO.md checkbox parsing. Instead of checking for any Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 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 |
🔍 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 Feb 11 14:43:12 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 bug where the pre-dispatch check for completed tasks was matching [x] anywhere in the task description, leading to false positives. The use of sed to precisely extract the checkbox status is a robust solution. I've suggested a minor refactoring to use a bash-native regular expression, which is slightly more efficient and concise, but the current implementation is correct and effectively resolves the issue.
| # Extract ONLY the checkbox at the start of the line, not [x] anywhere in description | ||
| local checkbox="" | ||
| checkbox=$(printf '%s' "$first_match" | sed -n 's/^[[:space:]]*- \[\(.\)\].*/\1/p') | ||
| if [[ "$checkbox" == "x" ]]; then |
There was a problem hiding this comment.
This is a correct fix for the issue. For improved performance and conciseness, you could consider using a single bash regular expression match. This avoids spawning printf and sed subprocesses and is generally more efficient.
| # Extract ONLY the checkbox at the start of the line, not [x] anywhere in description | |
| local checkbox="" | |
| checkbox=$(printf '%s' "$first_match" | sed -n 's/^[[:space:]]*- \[\(.\)\].*/\1/p') | |
| if [[ "$checkbox" == "x" ]]; then | |
| if [[ "$first_match" =~ ^[[:space:]]*-\ \[x\] ]]; then |



Summary
is_task_already_complete()used=~ \[x\]which matched[x]anywhere in the TODO.md line[x]text (e.g., "catches[x]in TODO.md") were falsely detected as completesed[x])Task
t290
Ref #1124
Testing
bash -n: passshellcheck -S warning: no new warnings[ ]line with[x]in description correctly returns space, not xSummary by CodeRabbit