feat(runtime): add policy parse helpers and unit test suite for d3d12_indirect_draw_policy #2074

Closed
leonida/mandy
abnalstlll-byte wants to merge 0 commits from feat/rt-indirect-draw-policy-coverage into main

Pull request closed

This pull request cannot be reopened because the branch was deleted.

abnalstlll-byte commented 2026-11-25 19:36:04 +00:00

Summary

  • Added pure parse helpers to
    untime/shims/d3d12_indirect_draw_policy.h:
    • \parse_indirect_draws_disabled(value, len): evaluates boolean policy directly from string buffer without modifying process environment or static cache.
    • \is_indirect_draws_raw_obsolete(value, len): detects obsolete raw mode string.
  • Authored portable unit test suite in
    untime/test/d3d12_indirect_draw_policy_test.cpp\ verifying parse logic across edge cases (case-sensitivity, length bounds, null inputs, obsolete tags) and default environment behaviour.
  • Registered \d3d12_indirect_draw_policy_test\ in
    untime/CMakeLists.txt\ under \if(WIN32).

Verification

  • Claimed in #1608: \RT-INDIRECT-DRAW-POLICY-COVERAGE\ (claim comment: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7172469043).
  • Compiled and executed \d3d12_indirect_draw_policy_test\ with MinGW C++20: all checks passed.
  • Verified test registration: \python -I tests/test_ctest_registration.py\ (5/5 passed).
  • Line ending check: \python -I tests/test_text_write_line_endings.py\ (passed).
  • Clean-room check: \python -I scripts/check_no_game_data.py\ (passed).

AI-assisted (Claude Code)

### Summary - Added pure parse helpers to \ untime/shims/d3d12_indirect_draw_policy.h\: - \parse_indirect_draws_disabled(value, len)\: evaluates boolean policy directly from string buffer without modifying process environment or static cache. - \is_indirect_draws_raw_obsolete(value, len)\: detects obsolete raw mode string. - Authored portable unit test suite in \ untime/test/d3d12_indirect_draw_policy_test.cpp\ verifying parse logic across edge cases (case-sensitivity, length bounds, null inputs, obsolete tags) and default environment behaviour. - Registered \d3d12_indirect_draw_policy_test\ in \ untime/CMakeLists.txt\ under \if(WIN32)\. ### Verification - Claimed in #1608: \RT-INDIRECT-DRAW-POLICY-COVERAGE\ (claim comment: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7172469043). - Compiled and executed \d3d12_indirect_draw_policy_test\ with MinGW C++20: all checks passed. - Verified test registration: \python -I tests/test_ctest_registration.py\ (5/5 passed). - Line ending check: \python -I tests/test_text_write_line_endings.py\ (passed). - Clean-room check: \python -I scripts/check_no_game_data.py\ (passed). AI-assisted (Claude Code)
MoonEyes commented 2026-11-28 18:00:40 +00:00

Hi @abnalstlll-byte, thanks for this pull request. It currently conflicts with main (conflicting file(s): runtime/CMakeLists.txt), so it carries the needs rebase label. CONTRIBUTING.md asks authors to rebase their branch on main; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here.

AI-assisted (Claude Code, Claude Opus 5.5).

Hi @abnalstlll-byte, thanks for this pull request. It currently conflicts with `main` (conflicting file(s): `runtime/CMakeLists.txt`), so it carries the `needs rebase` label. CONTRIBUTING.md asks authors to rebase their branch on `main`; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here. AI-assisted (Claude Code, Claude Opus 5.5).
MoonEyes commented 2026-11-29 12:54:44 +00:00

Closing: main already tests this policy in a fresh process (d3d12_com_test.cpp --indirect-policy, lines 41-48: unset, off, uppercase, and process caching). The refactor only splits two 3-character comparisons out of code that works, so it adds no coverage. Thanks for the effort!

Closing: main already tests this policy in a fresh process (d3d12_com_test.cpp --indirect-policy, lines 41-48: unset, off, uppercase, and process caching). The refactor only splits two 3-character comparisons out of code that works, so it adds no coverage. Thanks for the effort!
Sign in to join this conversation.
No description provided.