Tests that failed CI by timing: one asking at a time, and the heap-sync thread #55

Manually merged
github merged 2 commits from github-bot/gh-55 into main 2026-11-26 20:15:57 +00:00 AGit
Owner

@⁠TaynanGT on GitHub · 2026-11-26 19:51 UTC · original
TaynanGT:fix/flaky-tests → main · +27 −2 · 3 files · 2 commits · merged 2026-11-26 20:14 UTC

Three tests failed CI by timing: host::refresh_tests::unchanged_ranges_are_known (on this PR), watch::port7_tests::no_write_is_lost_with_port_7 and descriptor::tests::records_copied_as_bytes_are_made_at_the_next_sync (both seen locally). The xasync and descriptor-grid fixes this PR started with are already on main through #57; a follow-up PR handles the reentrant wait in XAsyncGetStatus.

  • The one asking. watch::ask_once keeps one asking for the whole process. When two tests asked at the same moment, each asking ended the other's, and one test's asking took the write the other was waiting for. The five tests that go through it (unchanged_ranges_are_known, no_write_is_lost_with_port_7, refreshed_ranges_hold_title_memory, landings_title_writes_and_light_refreshes_at_once, frame_of_refreshes) now hold a test-only lock, watch::one_asking_test(). Their assertions are unchanged.
  • The heap-sync thread. Once another test starts the victory-heap-sync thread, a sync on that thread can take a page's write and make the record just after the test's own sync_heaps() returns. The test syncs again for up to 200 ms; a record that is never made still fails.

This replaces the child-process isolation of unchanged_ranges_are_known from the earlier head, since the lock covers the whole family.

Checked by running the whole victory-gpu lib suite 15 times per commit on the RTX 4090 PC:

commit failures
before (6b00db81) 3 of 15 (2× no_write_is_lost_with_port_7, 1× records_copied_as_bytes_are_made_at_the_next_sync)
with the lock 0 of 15
with the lock and the descriptor retry 0 of 15

🤖 Generated with Claude Code

**@⁠TaynanGT** on GitHub · 2026-11-26 19:51 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/55) `TaynanGT:fix/flaky-tests` → `main` · +27 −2 · 3 files · 2 commits · merged 2026-11-26 20:14 UTC Three tests failed CI by timing: `host::refresh_tests::unchanged_ranges_are_known` (on this PR), `watch::port7_tests::no_write_is_lost_with_port_7` and `descriptor::tests::records_copied_as_bytes_are_made_at_the_next_sync` (both seen locally). The xasync and descriptor-grid fixes this PR started with are already on main through #57; a follow-up PR handles the reentrant wait in `XAsyncGetStatus`. - **The one asking.** `watch::ask_once` keeps one asking for the whole process. When two tests asked at the same moment, each asking ended the other's, and one test's asking took the write the other was waiting for. The five tests that go through it (`unchanged_ranges_are_known`, `no_write_is_lost_with_port_7`, `refreshed_ranges_hold_title_memory`, `landings_title_writes_and_light_refreshes_at_once`, `frame_of_refreshes`) now hold a test-only lock, `watch::one_asking_test()`. Their assertions are unchanged. - **The heap-sync thread.** Once another test starts the `victory-heap-sync` thread, a sync on that thread can take a page's write and make the record just after the test's own `sync_heaps()` returns. The test syncs again for up to 200 ms; a record that is never made still fails. This replaces the child-process isolation of `unchanged_ranges_are_known` from the earlier head, since the lock covers the whole family. Checked by running the whole `victory-gpu` lib suite 15 times per commit on the RTX 4090 PC: | commit | failures | |---|---| | before (6b00db81) | 3 of 15 (2× `no_write_is_lost_with_port_7`, 1× `records_copied_as_bytes_are_made_at_the_next_sync`) | | with the lock | 0 of 15 | | with the lock and the descriptor retry | 0 of 15 | 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A failed call leaves the table (release runs its provider's cleanup while
the block is still the title's) before its status shows. XAsyncGetStatus
with wait found no call in that gap and returned E_PENDING at once; the
test run_returns_the_work_result caught it now and then on CI. The wait
now also holds while no call is in flight and the status still reads
pending, which ends as soon as the status is published (or the call
being begun enters the table).

A test stalls a failed completion after its cleanup and checks the wait.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
views_off_their_elements_get_a_copy_of_their_bytes put its views 8 bytes
into a page of a heap allocation. Their copy is the 4 MiB window around
them, and when that page was 1 in 57 the structured view's offset in the
window fell on its 456-byte elements, so it rightly needed no copy of its
own and the test failed (twice on CI today). The offset is now picked off
that grid.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:54:26 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 19:52 UTC · original · edited 2026-11-26 20:12 UTC

Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T20:11:17.004764Z 8028442 New commits
🔒 Security Review ✅ Completed 2026-11-26T20:12:07.844818Z 8028442 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.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-26 19:52 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/55#issuecomment-7202043838) · edited 2026-11-26 20:12 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"802844286bf763ca86a9a85b11a1fd0c3045c8e6","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":"802844286bf763ca86a9a85b11a1fd0c3045c8e6","has_any_findings":null,"has_unresolved_findings":null,"status":"completed"}} --> <!-- codex-security-review:v1 {"blockingSeverityThreshold":"P0","headSha":"802844286bf763ca86a9a85b11a1fd0c3045c8e6","mergeGateEnabled":false,"pullRequestNumber":55,"repository":"TaynanGT/Vice-Tay","status":"completed"} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-26T20:11:17.004764Z">2026-11-26T20:11:17.004764Z</relative-time> | `8028442` | New commits | | 🔒 **Security Review** | ✅ **Completed** <relative-time datetime="2026-11-26T20:12:07.844818Z">2026-11-26T20:12:07.844818Z</relative-time> | `8028442` | New commits | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). 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. </details> </details>
github-bot changed title from Fix the two tests that failed main's CI by timing to Tests that failed CI by timing: one asking at a time, and the heap-sync thread 2026-11-26 20:10:35 +00:00
github-bot force-pushed github-bot/gh-55 from 6b00db8146 to 802844286b 2026-11-26 20:10:36 +00:00 Compare
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-26 20:05 UTC · original

The failing check in the first run was host::refresh_tests::unchanged_ranges_are_known. At e924a7a5, that test passed locally, along with all 15 xasync tests. Windows CI also passed the default and diagnostics suites and Clippy on that exact commit.

**@⁠TaynanGT** on GitHub · 2026-11-26 20:05 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/55#issuecomment-7202292146) The failing check in the first run was `host::refresh_tests::unchanged_ranges_are_known`. At `e924a7a5`, that test passed locally, along with all 15 `xasync` tests. [Windows CI](https://github.com/TaynanGT/Vice-Tay/actions/runs/45887866547) also passed the default and diagnostics suites and Clippy on that exact commit.
github manually merged commit 204b8e874f into main 2026-11-26 20:15:57 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.