Skip to content

fix(test): diagnose tiny-frame launch errors (Codex) - #6200

Closed
Vonsek wants to merge 5 commits into
ProjectLeonida:mainfrom
Vonsek:codex/tiny-frame-launch-diagnostic
Closed

Vonsek wants to merge 5 commits into
ProjectLeonida:mainfrom
Vonsek:codex/tiny-frame-launch-diagnostic

Conversation

@Vonsek

@Vonsek Vonsek commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: EGEN-TINY-FRAME-LAUNCH-DIAGNOSTIC

Depends on: #4971 and #5110 touch the same subprocess call sites. The PR stands on main. The combined trial merge passed the tests below.

What and why

Report a concise error if the tiny-frame Vulkan probe or loader cannot start. The diagnostic names the launch stage and supplies the command path or working directory. Once a process starts, its return code, output capture and queue options retain their existing behavior.

Tested

AI-assisted: yes

Checklist

  • No game data, keys or decryption, including in logs or reports quoted here.
  • Translator contract table update (not applicable).

AI-assisted.

@thehollowedone

Copy link
Copy Markdown

Independent Windows check of 39a41740, targeting 561b65a8. Windows x64, CPython 3.12.8.

All 14 stock test_check_tiny_frame.py tests passed. I also ran the CLI with paths containing spaces and a missing probe, missing loader, or missing guest working directory. Each run exited 1 with one diagnostic naming the stage and path and no traceback.

Two mocked controls passed. Probe exit 77 skipped the loader, and the success case preserved spaced arguments, the working directory, and output capture. Synthetic inputs only. AI-assisted.

# Conflicts:
#	runtime/test/check_tiny_frame.py
@shipped-it

Copy link
Copy Markdown

Tested 39a417401a on Linux (Arch): xwin cross-build clean; full ctest (245) under Wine 11.20/Xvfb: 226 passed, all 19 failures reproduce identically on unmodified origin/main @561b65a83 (headless-env set). Targeted: run_tiny_frame PASSED. VERDICT: pass. AI-assisted (omp coding assistant).

@lines9686-rgb

Copy link
Copy Markdown
Contributor

Tested 812cd3d91 merged onto main dde82f27e on Windows 11, Python 3.12.0 (Windows PowerShell 5.1), user profile path with non-ASCII characters: pass, with one note on the new test.

  • python -I tests/test_check_tiny_frame.py: 14 tests OK (default TEMP, and again with TEMP/TMP set to D:\Leonida\тест tmp, Cyrillic plus a space).
  • Fails on main: the PR's test file run against unmodified main gives 1 error (test_working_directory_is_reported_when_os_error_has_no_path, no run_process) and 3 subtest failures (test_start_errors_name_the_stage_and_path: missing probe, missing loader, missing working directory). So the new tests do catch the old traceback.
  • Note: with TEMP set to a folder name outside the ANSI code page (D:\Leonida\тест tmp ü, the code page here is cp1251), the 3 subtests of test_start_errors_name_the_stage_and_path fail. The script itself does the right thing: it prints FAIL: cannot start Vulkan device probe (...missing probe): [WinError 2] ... and no traceback. The child Python writes stderr in the ANSI code page with backslashreplace, so ü arrives as \xfc and assertIn(str(path), result.stderr) misses it. Running the child as [sys.executable, "-I", "-X", "utf8", SPEC.origin, *args] and passing encoding="utf-8" to subprocess.run in the test makes all 14 pass with that TEMP (checked locally, not pushed). Optional; it only matters for test runs in such folders.

No game files. AI-assisted (Claude Code).

@rideinstead

Copy link
Copy Markdown

TEST validation — Approve

Validated on CPU (no GPU, no game files). Python-only test; explicitly "CPU only."

What changed: runtime/test/check_tiny_frame.py — wraps subprocess.run calls in a run_process() helper that catches OSError and prints a diagnostic instead of an uncaught traceback. New test file: tests/test_check_tiny_frame.py with LaunchDiagnosticTest class.

Tests: 4 subtests — missing probe, missing loader, missing working directory, working directory reported when OSError has no path. Each asserts exit code 1, FAIL: cannot start <stage> in stderr, path in stderr, no Traceback.

Verification: Tested on Linux x86_64 CPU-only cloud, Windows (Python 3.12), and under Wine 11.20/Xvfb (full ctest 245: 226 passed, all 19 failures reproduce on unmodified main). Reviewers Kam471 and shayderrr approved; independently verified by caltr98 (RTX 5080 laptop, Windows 11) and wasonidas (MSVC 19.44, Windows 11 build 26300).

Note: lines9686-rgb flagged non-ASCII TEMP path edge case on Windows (optional, not pushed as fix).

Recommendation: Approve / merge.

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.

6 participants