[PR #2451] [MERGED] parity: retry a known flaky harness once, and say so #4328

Closed
opened 2026-11-03 04:16:22 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2451
Author: @ludovic111
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: ci/parity-known-flaky


📝 Commits (1)

  • e82fa3d parity: retry a known flaky harness once, and say so

📊 Changes

4 files changed (+161 additions, -9 deletions)

View changed files

📝 docs/parity-workflow.md (+7 -0)
📝 tests/test_parity_runner.py (+81 -3)
📝 tools/parity.py (+68 -6)
📝 tools/parity_hosts.json (+5 -0)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

What

tools/parity_hosts.json gets a known_flaky list, with a reason per harness. A listed harness that fails runs once more, from scratch, and a pass then counts. Every retry is reported loudly:

  • a RETRIED <name>: ... line during the run and again under the summary;
  • a "Harnesses that failed once, then ran again" section in $GITHUB_STEP_SUMMARY, on both PR parity and parity-main.

The first run's log is kept as <name>.first-run.log.

Listed for now, from the test-health-1 flake list (CI history since 10-25 evening):

Harness Cause Fix
dedicated_server Its Java client steps on a 1.5 s timer: under load the respawn's add_entity/update_attributes or entity_event 19 lands in the wrong step. It failed and then passed at the same head (main 9cbf93a19, and a PR). Next PR: wait on a server sync.
remote_fireball It samples the fireball on the wall clock: "visible in only 4-5 samples", 3 times on the desktop runner. Next.
world_reopen It once saw 4 minecarts instead of 3 on a loaded runner, then passed at the same head. —

Each entry comes off the list once its cause is fixed.

Why

A flake stops a queued PR (ready_merger.sh STOPs on a parity failure), and someone has to rerun the job by hand. Only harnesses with a documented reason are retried. A harness that is new to flaking, or one a branch makes nondeterministic (light and command_exec flipped at one lithostitched head), still fails at once.

Also

  • The existing fresh rerun of a failure that reused oracle results now shows up in the same RETRIED report. Before, it only printed retry X without reused oracle results mid-run.
  • A known flaky harness skips that rerun and gets its own retry instead. After a pass it keeps reusing oracle results: a flake says nothing about its cached oracle runs. Before, a flaky pass after a fresh rerun turned oracle reuse off for that harness for good.
  • --repeat and --flake-check runs are never retried.

Tested

  • python3 -m unittest discover -s tests: 318 + 6 new, all OK. The new KnownFlakyTests drive parity.run with a fake executor:
    • a known flaky harness is retried fresh, exactly once, and keeps oracle reuse;
    • any other harness keeps only the oracle rerun;
    • repeated runs are never retried;
    • the retry reaches the job summary;
    • every entry has a reason and names an existing harness.
  • End to end: I added a temporary harness that fails its first run, listed it, and ran parity.py zzflaky -j 1. The output was FAIL zzflaky, then RETRIED zzflaky: ... running it once more (first run's log: ...zzflaky.first-run.log), PASS zzflaky, 1 passed, 0 failed, the RETRIED summary line, and the summary file section. The temporary harness was removed afterwards.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2451 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `ci/parity-known-flaky` --- ### 📝 Commits (1) - [`e82fa3d`](https://github.com/horizon-rust/horizon/commit/e82fa3d957b70971510ea267375e9160859ede51) parity: retry a known flaky harness once, and say so ### 📊 Changes **4 files changed** (+161 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `docs/parity-workflow.md` (+7 -0) 📝 `tests/test_parity_runner.py` (+81 -3) 📝 `tools/parity.py` (+68 -6) 📝 `tools/parity_hosts.json` (+5 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What `tools/parity_hosts.json` gets a `known_flaky` list, with a reason per harness. A listed harness that fails runs **once more, from scratch**, and a pass then counts. Every retry is reported loudly: - a `RETRIED <name>: ...` line during the run and again under the summary; - a "Harnesses that failed once, then ran again" section in `$GITHUB_STEP_SUMMARY`, on both PR parity and parity-main. The first run's log is kept as `<name>.first-run.log`. Listed for now, from the test-health-1 flake list (CI history since 10-25 evening): | Harness | Cause | Fix | |---|---|---| | `dedicated_server` | Its Java client steps on a 1.5 s timer: under load the respawn's `add_entity`/`update_attributes` or `entity_event 19` lands in the wrong step. It failed and then passed at the same head (main 9cbf93a19, and a PR). | Next PR: wait on a server sync. | | `remote_fireball` | It samples the fireball on the wall clock: "visible in only 4-5 samples", 3 times on the desktop runner. | Next. | | `world_reopen` | It once saw 4 minecarts instead of 3 on a loaded runner, then passed at the same head. | — | Each entry comes off the list once its cause is fixed. ## Why A flake stops a queued PR (`ready_merger.sh` STOPs on a parity failure), and someone has to rerun the job by hand. Only harnesses with a documented reason are retried. A harness that is new to flaking, or one a branch makes nondeterministic (`light` and `command_exec` flipped at one lithostitched head), still fails at once. ## Also - The existing fresh rerun of a failure that reused oracle results now shows up in the same RETRIED report. Before, it only printed `retry X without reused oracle results` mid-run. - A known flaky harness skips that rerun and gets its own retry instead. After a pass it keeps reusing oracle results: a flake says nothing about its cached oracle runs. Before, a flaky pass after a fresh rerun turned oracle reuse off for that harness for good. - `--repeat` and `--flake-check` runs are never retried. ## Tested - `python3 -m unittest discover -s tests`: 318 + 6 new, all OK. The new `KnownFlakyTests` drive `parity.run` with a fake executor: - a known flaky harness is retried fresh, exactly once, and keeps oracle reuse; - any other harness keeps only the oracle rerun; - repeated runs are never retried; - the retry reaches the job summary; - every entry has a reason and names an existing harness. - End to end: I added a temporary harness that fails its first run, listed it, and ran `parity.py zzflaky -j 1`. The output was `FAIL zzflaky`, then `RETRIED zzflaky: ... running it once more (first run's log: ...zzflaky.first-run.log)`, `PASS zzflaky`, `1 passed, 0 failed`, the RETRIED summary line, and the summary file section. The temporary harness was removed afterwards. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:16:22 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4328
No description provided.