Skip to content

feat(devtools): rerun failed tests once and name flakes; code review rules - #4533

Merged
Sinity merged 1 commit into
masterfrom
feat/review-rules-and-rerun
Sep 2, 2026
Merged

Sinity merged 1 commit into
masterfrom
feat/review-rules-and-rerun

Conversation

@Sinity

@Sinity Sinity commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

devtools verify reruns a pytest step's failed tests once, alone and unselected; a test failing twice is red, one passing on rerun is recorded as flaky. AGENTS.md gains a ## Code Review Rules section.

Problem

The complete corpus run beside six lanes reported 559 failed / 67 errors; tests/unit/devtools/test_reindex_packets.py had 76 failures there and passes 80/80 alone at the same head (run 20260902T063819Z-all-1443122-d4a9b46d). Red counts mixed load-induced flakes with real defects. Hosted review on #4509 reached ten rounds with findings drifting to environment enumeration; Codex applies ## Code Review Rules from AGENTS.md.

Solution

_rerun_failed_once: exact node ids, -p no:testmon -p no:randomly, single process, same managed environment; results patched into the canonical report (flaky: true, first_outcome, summary flaky count) so the receipt and evidence evaluation see flakes as passed-with-record. Capped at 300 node ids. Rules section: findings name a concrete input and outcome; caches keyed on declared inputs; answered threads are closed; tests judged by their anti-vacuity condition.

Beads: polylogue-2g55j, polylogue-xulmu.

Verification

devtools test tests/unit/devtools/test_verify.py   # 27 passed (includes test_failed_tests_are_rerun_once_and_flakes_are_named)
devtools verify --quick                             # exit 0

Residual risk

Flaky tests are visible in receipts but not yet filed automatically; that follow-up stays in the bead.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YGi8wLWGR2HYBh8p8fXFXz

Receipt: session-01YGi8wLWGR2HYBh8p8fXFXz

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-02T16:45:35.248360Z 551a95c New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: 8740b3ab-ae8f-49e3-a6a1-4e579ac83feb


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.

@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: b7f473a5c8

ℹ️ 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 devtools/verify.py Resolved

@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: 457c1c93fb

ℹ️ 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 devtools/verify.py Resolved
@Sinity
Sinity force-pushed the feat/review-rules-and-rerun branch from 457c1c9 to 96df4ef Compare September 2, 2026 11:11
@Sinity

Sinity commented Sep 2, 2026

Copy link
Copy Markdown
Owner 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: 96df4ef8d5

ℹ️ 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 devtools/verify.py Resolved
@Sinity

Sinity commented Sep 2, 2026

Copy link
Copy Markdown
Owner 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: 67bd27b29e

ℹ️ 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 devtools/verify.py Resolved
@Sinity
Sinity force-pushed the feat/review-rules-and-rerun branch from 67bd27b to 551a95c Compare September 2, 2026 16:37
@Sinity
Sinity merged commit 725f8ac into master Sep 2, 2026
2 of 3 checks passed
@Sinity
Sinity deleted the feat/review-rules-and-rerun branch September 2, 2026 16:37

@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: 551a95c6ed

ℹ️ 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 devtools/verify.py Resolved
Comment thread devtools/verify.py Resolved
@Sinity

Sinity commented Sep 28, 2026

Copy link
Copy Markdown
Owner Author

Codex review threads on this PR whose cited code is gone (checked against master at 23f91a5):

Resolving these threads.

@Sinity

Sinity commented Sep 29, 2026

Copy link
Copy Markdown
Owner Author

Closing out open Codex review threads on this PR (evidence checked against master at 64a9bd0):

  • P1 devtools/verify.py:419: Fixed on master (checked at 64a9bd0): When every failure passes on rerun, adjudicate_rerun also rewrites the progress plugin's summary.json exit status to 0, so the report and summary agree (devtools/pytest_rerun.py:344-353).
  • P1 devtools/verify.py:503: Fixed on master (checked at 64a9bd0): Flake recovery runs only when the initial pytest exit is 1 (devtools/verify.py:870-887); exits 2, 3, 4 and signal codes keep their original status.

Resolving every thread listed; confirmed defects are fixed under the named bead.

@Sinity

Sinity commented Sep 29, 2026

Copy link
Copy Markdown
Owner Author

Closing out open Codex review threads on this PR (evidence checked against master at bf68918):

Resolving every thread listed; confirmed defects are fixed under the named bead.

@Sinity

Sinity commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

  • 56.F025 / P1: fixed-already at the checked revision: devtools/pytest_rerun.py:340 refuses reports from reruns whose process exits outside 0/1. The additional guard at devtools/pytest_rerun.py:357 restores every failure when all nodes passed but the rerun process still exited nonzero, preventing the reported false green.

Only the rows listed above are dispositioned. Held findings remain open.

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