Skip to content

fix(ci): ignore stale and resolved Codex inline findings#981

Open
Komzpa wants to merge 6 commits into
mainfrom
fix/codex-label-original-commit
Open

fix(ci): ignore stale and resolved Codex inline findings#981
Komzpa wants to merge 6 commits into
mainfrom
fix/codex-label-original-commit

Conversation

@Komzpa

@Komzpa Komzpa commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • classify inline Codex review comments by original_commit_id instead of trusting a rebased commit_id alone
  • filter unresolved Codex review threads with the same current-head/original-commit evidence rule, so stale rebased threads do not keep 🤖 codex: needs work
  • ignore resolved or outdated inline Codex findings when computing current-head review state
  • classify duplicate check-run names by the latest run start/creation time, so superseded failed or cancelled runs do not override a newer rerun on the same head
  • add OpenSpec coverage and regression tests for stale rebased comments, resolved inline findings, unresolved inline findings, and duplicate check-run recency

Absorbs #1002.

Tests

uv run pytest tests/unit/test_sync_codex_ok_labels.py
uv run ruff format --check .github/scripts/sync_codex_ok_labels.py tests/unit/test_sync_codex_ok_labels.py
uv run ruff check .github/scripts/sync_codex_ok_labels.py tests/unit/test_sync_codex_ok_labels.py
uv run ty check .github/scripts/sync_codex_ok_labels.py tests/unit/test_sync_codex_ok_labels.py
uv run openspec validate fix-codex-label-current-head-evidence --strict
uv run openspec validate ignore-resolved-codex-inline-findings --strict
uv run openspec validate --specs
git diff --check origin/main...HEAD

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

Copy link
Copy Markdown

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: 3b9708a18c

ℹ️ 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/scripts/sync_codex_ok_labels.py Outdated
@Soju06 Soju06 added the 🤖 codex: needs work [@codex review] raised an issue label Jun 11, 2026
@Komzpa Komzpa force-pushed the fix/codex-label-original-commit branch from 3b9708a to 027cf0c Compare June 11, 2026 06:25
@Soju06 Soju06 removed the 🤖 codex: needs work [@codex review] raised an issue label Jun 11, 2026
@Soju06

Soju06 commented Jun 11, 2026

Copy link
Copy Markdown
Owner

@codex review

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

Copy link
Copy Markdown

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: 027cf0cb3b

ℹ️ 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/scripts/sync_codex_ok_labels.py Outdated
@Soju06 Soju06 added the 🤖 codex: needs work [@codex review] raised an issue label Jun 11, 2026
@Komzpa Komzpa force-pushed the fix/codex-label-original-commit branch from 027cf0c to c8dfb95 Compare June 11, 2026 06:36
@Soju06 Soju06 removed the 🤖 codex: needs work [@codex review] raised an issue label Jun 11, 2026
@Soju06

Soju06 commented Jun 11, 2026

Copy link
Copy Markdown
Owner

@codex review

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

Copy link
Copy Markdown

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: c8dfb9571d

ℹ️ 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/scripts/sync_codex_ok_labels.py
@Soju06 Soju06 added the 🤖 codex: needs work [@codex review] raised an issue label Jun 11, 2026
@Komzpa Komzpa force-pushed the fix/codex-label-original-commit branch from c8dfb95 to 1b590ae Compare June 11, 2026 06:51
@Soju06 Soju06 removed the 🤖 codex: needs work [@codex review] raised an issue label Jun 11, 2026
@Soju06

Soju06 commented Jun 11, 2026

Copy link
Copy Markdown
Owner

@codex review

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

Copy link
Copy Markdown

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: 1b590ae479

ℹ️ 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/scripts/sync_codex_ok_labels.py Outdated
@Soju06 Soju06 added the 🤖 codex: needs work [@codex review] raised an issue label Jun 11, 2026
@Komzpa Komzpa force-pushed the fix/codex-label-original-commit branch from 1b590ae to 66dc6b8 Compare June 11, 2026 07:05
@Komzpa Komzpa removed the 🤖 codex: needs work [@codex review] raised an issue label Jun 11, 2026
@Komzpa Komzpa force-pushed the fix/codex-label-original-commit branch from 66dc6b8 to cac584a Compare June 11, 2026 07:06
@Soju06 Soju06 added the 🤖 codex: needs work [@codex review] raised an issue label Jun 11, 2026
@Komzpa Komzpa removed the 🤖 codex: needs work [@codex review] raised an issue label Jun 11, 2026
@Soju06 Soju06 added the 🤖 codex: needs work [@codex review] raised an issue label Jun 11, 2026
@Soju06

Soju06 commented Jun 11, 2026

Copy link
Copy Markdown
Owner

@codex review

@Komzpa Komzpa removed the 🤖 codex: needs work [@codex review] raised an issue label Jun 11, 2026
@Soju06 Soju06 added the 🤖 codex: needs work [@codex review] raised an issue label Jun 11, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ 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".

@Komzpa Komzpa added 🤖 codex: ok [@codex review] says no issues found. and removed 🤖 codex: needs work [@codex review] raised an issue labels Jun 11, 2026
@Soju06 Soju06 removed the 🤖 codex: ok [@codex review] says no issues found. label Jun 11, 2026
@Komzpa Komzpa added the 🤖 codex: ok [@codex review] says no issues found. label Jun 11, 2026
@Soju06 Soju06 removed the 🤖 codex: ok [@codex review] says no issues found. label Jun 12, 2026
@Komzpa Komzpa force-pushed the fix/codex-label-original-commit branch from f313709 to d71cb64 Compare June 14, 2026 19:31
@Komzpa Komzpa changed the title fix(ci): ignore stale rebased Codex inline comments fix(ci): ignore stale and resolved Codex inline findings Jun 14, 2026
@Komzpa

Komzpa commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: d71cb6480b

ℹ️ 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".

@Komzpa Komzpa added the 🤖 codex: ok [@codex review] says no issues found. label Jun 15, 2026
@Soju06 Soju06 removed the 🤖 codex: ok [@codex review] says no issues found. label Jun 15, 2026
@Komzpa Komzpa added the 🤖 codex: ok [@codex review] says no issues found. label Jun 15, 2026
@Soju06 Soju06 removed the 🤖 codex: ok [@codex review] says no issues found. label Jun 15, 2026
@Komzpa Komzpa added the 🤖 codex: ok [@codex review] says no issues found. label Jun 15, 2026
@Soju06 Soju06 removed the 🤖 codex: ok [@codex review] says no issues found. label Jun 15, 2026
@Komzpa Komzpa added the 🤖 codex: ok [@codex review] says no issues found. label Jun 15, 2026
@Soju06 Soju06 removed the 🤖 codex: ok [@codex review] says no issues found. label Jun 15, 2026
@Komzpa Komzpa added the 🤖 codex: ok [@codex review] says no issues found. label Jun 15, 2026
@Soju06

Soju06 commented Jun 15, 2026

Copy link
Copy Markdown
Owner

@codex review

1 similar comment
@Komzpa

Komzpa commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

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

Copy link
Copy Markdown

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: 706eff12fc

ℹ️ 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/scripts/sync_codex_ok_labels.py
@Soju06

Soju06 commented Jun 15, 2026

Copy link
Copy Markdown
Owner

@codex review

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

trigger_codex_review = (

P3 Badge Suppress review requests when findings are unresolved

When a reanchored Codex inline finding is still unresolved on the current head but its original review/comment timestamp predates that head, the new thread scan sets unresolved_finding_urls and wants_needs_work_label, while the timeline scan can still report review_state == "none" and has_codex_news == False. Because this trigger ignores unresolved_finding_urls, the scheduled/all-open run can post a redundant @codex review on a PR that is already blocked by an active current-head finding; add that guard here so needs-work evidence does not also request a fresh review.

ℹ️ 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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖 codex: ok [@codex review] says no issues found.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants