Skip to content

[codex] Fix stale PR and Linear open issue filters#338

Merged
redreceipt merged 7 commits into
mainfrom
codex/fix-stale-pr-and-linear-open-filters
May 20, 2026
Merged

[codex] Fix stale PR and Linear open issue filters#338
redreceipt merged 7 commits into
mainfrom
codex/fix-stale-pr-and-linear-open-filters

Conversation

@redreceipt
Copy link
Copy Markdown
Member

@redreceipt redreceipt commented May 20, 2026

Issue

  • The stale PR checker skipped PRs whenever GitHub's aggregate review decision was CHANGES_REQUESTED, even when the requested-changes reviewer was still the person who needed a reminder or had been re-requested after follow-up commits.
  • A Linear issue closed as Duplicate could still appear in open priority bug notifications because open queries excluded a few terminal state types instead of selecting Linear's open state types.

Solution

  • Make stale PR reminders reviewer-specific for active requested-changes reviews: notify only the active change-requesting reviewer while that state is active, and fall back to all open review requests once the change request is cleared.
  • Require a current open review request before sending a stale-review reminder, and use the latest request timestamp when calculating stale age.
  • Query open Linear work with the comprehensive open state type allow-list: triage, backlog, unstarted, and started.

To Test

  • source .venv-ci/bin/activate && python -m unittest discover -s tests -p 'test_*.py'
  • source .venv-ci/bin/activate && ruff check .
  • source .venv-ci/bin/activate && ruff format --check .
  • source .venv-ci/bin/activate && vulture . --config pyproject.toml
  • source .venv-ci/bin/activate && mypy .

Proof

Runtime proof

  • Runtime proof ran jobs.post_stale() against a local Slack-compatible webhook and showed only the active change-requesting reviewer notified.
  • Runtime proof also exercised github.get_prs_waiting_for_review_by_reviewer() and live linear.issues.get_open_issues(2, "Bug"), confirming APO-8787 is absent from open priority bugs.
  • Full test suite passed: 90 tests.
  • Ruff, format check, vulture, and mypy passed locally.
  • GitHub CI is green for ruff, mypy, unit-tests, vulture, and gunicorn-smoke.

@redreceipt redreceipt marked this pull request as ready for review May 20, 2026 17:25
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 176de6b62a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread github.py Outdated
@redreceipt redreceipt temporarily deployed to bug-board-codex-fix-sta-won2eq May 20, 2026 17:30 Inactive
@redreceipt redreceipt temporarily deployed to bug-board-codex-fix-sta-won2eq May 20, 2026 17:35 Inactive
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3164f1a381

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread github.py Outdated
@redreceipt redreceipt temporarily deployed to bug-board-codex-fix-sta-won2eq May 20, 2026 17:41 Inactive
@redreceipt redreceipt temporarily deployed to bug-board-codex-fix-sta-won2eq May 20, 2026 17:42 Inactive
@redreceipt redreceipt temporarily deployed to bug-board-codex-fix-sta-won2eq May 20, 2026 17:43 Inactive
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dc077c7e45

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread github.py Outdated
@redreceipt redreceipt temporarily deployed to bug-board-codex-fix-sta-won2eq May 20, 2026 17:50 Inactive
@redreceipt redreceipt merged commit 18f8a15 into main May 20, 2026
5 checks passed
@redreceipt redreceipt deleted the codex/fix-stale-pr-and-linear-open-filters branch May 20, 2026 17:51
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