t1038: Guard Phase 3c against closing issues for no_pr false completions#1391
t1038: Guard Phase 3c against closing issues for no_pr false completions#1391marcusquinn merged 1 commit intomainfrom
Conversation
deployed/verified tasks with pr_url = no_pr, task_only, or empty are unverified completions (often from the false completion cascade). Only reconcile-close issues when a real PR URL exists. cancelled/failed tasks are always safe to close regardless of pr_url. Root cause: t031 (issue #512) was falsely closed because it was 'deployed' in the DB with pr_url=no_pr — a leftover from the earlier false completion cascade that was already reverted once. Refs: t1038, GH#1389
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 refines the task reconciliation process to prevent premature closure of GitHub issues. It specifically addresses a bug where tasks marked as Highlights
Changelog
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
|
WalkthroughModified the Phase 3c reconciliation query in pulse.sh to conditionally gate terminal statuses on valid pr_url values. Tasks with 'cancelled' or 'failed' statuses remain unconditional, while 'verified' or 'deployed' statuses now require a non-placeholder pr_url (excluding 'no_pr', 'task_only', 'verified_complete'). Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 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: Fri Feb 13 16:24: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 GitHub issues were being closed for tasks that completed without a valid pull request. The change tightens the criteria in the SQL query to ensure only tasks with a real PR URL are reconciled when in a 'deployed' or 'verified' state. The logic is sound. The suggestion to refactor the SQL query for improved readability and maintainability has been retained.
| AND pr_url IS NOT NULL | ||
| AND pr_url != '' | ||
| AND pr_url != 'no_pr' | ||
| AND pr_url != 'task_only' | ||
| AND pr_url != 'verified_complete' |
There was a problem hiding this comment.
For better readability and conciseness, you can combine the multiple pr_url checks into a single NOT IN clause. The explicit IS NOT NULL check is also redundant, as NOT IN will not match NULL values, achieving the same result more compactly.
| AND pr_url IS NOT NULL | |
| AND pr_url != '' | |
| AND pr_url != 'no_pr' | |
| AND pr_url != 'task_only' | |
| AND pr_url != 'verified_complete' | |
| AND pr_url NOT IN ('', 'no_pr', 'task_only', 'verified_complete') |



Summary
deployedin the DB withpr_url=no_pr— a false completion from the earlier cascadedeployed/verifiedissues when a real PR URL exists (notno_pr,task_only,verified_complete, or empty)cancelled/failedtasks are always safe to close regardless ofpr_urlThis is the same proof-log principle documented in AGENTS.md: "If a worker completes with
no_prortask_only, the task stays[ ]until verified."Refs: t1038, GH#1389
Summary by CodeRabbit