Skip to content

Restore shader resume regression tests for the polling scheduler - #7018

Open
jewmaster1337 wants to merge 1 commit into
ItsNotRexed:mainfrom
jewmaster1337:codex/restore-shader-resume-tests
Open

jewmaster1337 wants to merge 1 commit into
ItsNotRexed:mainfrom
jewmaster1337:codex/restore-shader-resume-tests

Conversation

@jewmaster1337

Copy link
Copy Markdown
Contributor

Claimed in coordination #6910.

What changed

The build scheduler in #1797 polls shader subprocesses. The fake in tests/test_make_game_resume.py only implemented wait(), so 11 existing regressions errored before checking which shards were reused. The fake now completes its synthetic writes once and exposes the exit status through poll(). The same tests still cover retrying failed shards, reusing finished shards, and throwing out incompatible plans.

Verification

  • Before the change, 11 tests failed with AttributeError: 'FakeProc' object has no attribute 'poll' on upstream main.
  • python -IB tests/test_make_game_resume.py -v — 14 passed on native Windows and in an Ubuntu 24.04 container.
  • python3 -IB tests/test_make_game_translate_cleanup.py -v — 3 passed on Ubuntu 24.04.
  • python -m pytest -q tests/test_make_game*.py tests/test_leonida_tui.py (paths expanded in PowerShell) — 414 passed, 4 skipped, and 97 subtests passed on Windows.
  • Python compilation and git diff --check passed.

CPU-only tests with synthetic fixtures. AI-assisted (Codex).

@wasonidas

Copy link
Copy Markdown

Independent Windows/Python 3.15.2 check of a901454cc64421d6f3ac8455a9b63ac8192e4938. The resume suite went from 3 passes and 11 missing-poll() errors on parent 48ab3400 to 14/14 on the PR, and 14/14 with the PR applied to main 8575d36e. All existing resume assertions are retained. The cleanup, translator flags, wave64 and translation completeness suites passed.

As controls on the integrated tree, disabling shard reuse caused four assertion failures, and ignoring a failed shard exit caused one. Those verify that the resume assertions still exercise the scheduler behavior. Non-blocking note: the fake no longer implements wait(timeout=...), so a forced interruption in this specific test harness can raise AttributeError in _stop_procs(). The separate cleanup suite passed and uses its own fake. Retaining a small wait() method would make this fake usable in future interruption cases.

Synthetic inputs only. AI-assisted.

@illusionart453-max

Copy link
Copy Markdown

Independent native Windows/Python 3.15 verification at a901454: python -I tests/test_make_game_resume.py passes 14/14 in an isolated worktree. Main 8575d36 CPU audit reproduces FakeProc missing poll() across resume cases; the polling mocks here exercise the scheduler and pass. Synthetic inputs only, no GPU/game files. AI-assisted (Codex).

@kapitche

Copy link
Copy Markdown
Contributor

Tested a901454 merged with main 8575d36 on Linux/Python 3.12.16: pass

  • python -I tests/test_make_game_resume.py on the merge: 14 tests OK
  • Test-only change (the fake Popen gets poll() and the old wait() body becomes finish(), run at construction). Control: the same test file from upstream/main run against main's make_game.py: FAILED (errors=11), because make_game.py polls its shard processes (p.poll(), make_game.py line 1701) and the old fake had no poll. So the PR fixes tests that are broken on main. Restored with git checkout HEAD --.

@slint6614-dev

Copy link
Copy Markdown
Contributor

Independent Linux check (WSL2, CPython 3.14.4) merged into main 042c5f378: pass. tests/test_make_game_resume.py goes from 11 errors ('FakeProc' object has no attribute 'poll') to OK. #7309 fixes the same thing later with a larger fake. AI-assisted (Claude).

@Daazd

Daazd commented Nov 23, 2026

Copy link
Copy Markdown

Independent check (Linux, Python 3.12.3, Node 24.13, CPU only, no game files): head a901454cc merged onto main 6a4299563: merges clean.

  • python3 -I tests/test_make_game_resume.py: Ran 14 tests in 0.029s OK (exit 0)

Fixes test_make_game_resume (11 errors on main: 'FakeProc' object has no attribute 'poll').

AI-assisted (Claude Code).

@airp1ane

Copy link
Copy Markdown
Contributor

Tested a901454 on Windows 11, Python 3.15.2, NVIDIA RTX 4060 Ti (driver 621.24; CPU-only checks, no game files, no GPU/llvm-mc/MSVC used): pass.

Ran the test files this PR adds or changes, from a clean checkout of the PR head: test_make_game_resume.py - all exit 0.

AI-assisted (Claude Code).

@ne1i

ne1i commented Nov 23, 2026

Copy link
Copy Markdown

Tested a901454c on Linux, CPython 3.14, CPU only, synthetic inputs, merged onto main dde82f27: pass

  • python -I tests/test_make_game_resume.py: 14 tests OK (red on main: 11 errors, 'FakeProc' object has no attribute 'poll').
  • Test-only change; its absence is main.
  • compileall and scripts/check_no_game_data.py on the changed files: clean.

Independent check (not the author). Run by an AI agent (DeepSeek V4.1 Flash) and re-run by the orchestrating session (Claude Code) before posting; claimed in #8047.

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.

8 participants