Skip to content

Comments

t1038: Guard Phase 3c against closing issues for no_pr false completions#1391

Merged
marcusquinn merged 1 commit intomainfrom
bugfix/t1038-phase3c-no-pr-guard
Feb 13, 2026
Merged

t1038: Guard Phase 3c against closing issues for no_pr false completions#1391
marcusquinn merged 1 commit intomainfrom
bugfix/t1038-phase3c-no-pr-guard

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Feb 13, 2026

Summary

This is the same proof-log principle documented in AGENTS.md: "If a worker completes with no_pr or task_only, the task stays [ ] until verified."

Refs: t1038, GH#1389

Summary by CodeRabbit

  • Bug Fixes
    • Refined terminal task status handling to prevent improper issue closure for non-PR or placeholder task states. Now validates PR URLs before reconciling tasks with terminal statuses.

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
@gemini-code-assist
Copy link

Summary of Changes

Hello @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 deployed or verified were being closed even when they lacked a valid pull request URL, leading to false completions. The updated logic ensures that issues are only closed for deployed or verified tasks if a concrete pull request is associated, maintaining accuracy in task tracking.

Highlights

  • Prevented incorrect issue closure: Phase 3c no longer closes issues for deployed tasks with pr_url=no_pr, which previously led to false completions.
  • Refined reconciliation logic: deployed and verified issues are now only reconciled and closed if they have a valid PR URL, explicitly excluding no_pr, task_only, verified_complete, or empty pr_url values.
  • Unchanged behavior for other statuses: cancelled and failed tasks continue to be safely closed regardless of their pr_url.
  • Adherence to proof-log principle: The change reinforces the AGENTS.md principle that tasks with no_pr or task_only remain open until verified.
Changelog
  • .agents/scripts/supervisor/pulse.sh
    • Modified the SQL query for terminal_tasks to include additional conditions for pr_url when status is verified or deployed.
    • Added comments explaining the new logic for reconciling cancelled/failed vs. deployed/verified tasks.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 13, 2026

Walkthrough

Modified 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

Cohort / File(s) Summary
Reconciliation Query Refinement
.agents/scripts/supervisor/pulse.sh
Modified terminal_tasks query logic in Phase 3c to differentiate status handling. Added conditional checks ensuring 'verified' and 'deployed' statuses only count when pr_url contains a valid PR reference, preventing closure of issues for non-PR or placeholder PR states. Added explanatory comments documenting the decision criteria.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🎯 A query once blind, now sees the light,
Filtering noise from PRs truly right,
No phantom URLs shall pass this gate,
Only real branches meet their fate—
Terminal statuses, now validate! ✨

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: adding guards to prevent Phase 3c from closing issues when pr_url indicates false completions (no_pr, task_only, verified_complete).
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/t1038-phase3c-no-pr-guard

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.

❤️ Share

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

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 22 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Fri Feb 13 16:24:09 UTC 2026: Code review monitoring started
Fri Feb 13 16:24:10 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 22

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 22
  • VULNERABILITIES: 0

Generated on: Fri Feb 13 16:24:12 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +541 to +545
AND pr_url IS NOT NULL
AND pr_url != ''
AND pr_url != 'no_pr'
AND pr_url != 'task_only'
AND pr_url != 'verified_complete'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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')

@marcusquinn marcusquinn merged commit ff98973 into main Feb 13, 2026
15 checks passed
@marcusquinn marcusquinn deleted the bugfix/t1038-phase3c-no-pr-guard branch February 21, 2026 01:59
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