feat(runtime): add input validation guards and unit test suite for d3d12_pipeline_checkpoint #2081

Open
github-bot wants to merge 1 commit from github-bot/gh-2081 into main AGit
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-25 19:42 UTC · original
abnalstlll-byte:feat/rt-pipeline-checkpoint-guards-and-tests → main · +166 −1 · 3 files · 1 commits · open

Summary

  • Added input validation guards and helper accessors in
    untime/shims/d3d12_pipeline_checkpoint.h:
    • \CacheStagingFile: gracefully rejects empty destination and 0-byte mappings. Added \is_valid()\ and \ emp_path()\ accessors.
    • \publish(): validates non-null data and non-empty destination prior to unmapping and moving.
    • Added pure helper \is_direct_session_cache_enabled(val, len)\ to inspect environment strings.
  • Added comprehensive unit test suite in
    untime/test/d3d12_pipeline_checkpoint_test.cpp:
    • Tests \CompileActivity\ RAII counter under single-threaded and multithreaded concurrency.
    • Tests \is_direct_session_cache_enabled\ across edge cases.
    • Tests \cache_temp_suffix\ across valid and malformed suffixes.
    • Tests \CacheStagingFile\ invalid arguments, publish workflow, and RAII abort cleanup.
    • Tests \clean_stale_cache_files\ edge cases.
  • Registered \d3d12_pipeline_checkpoint_test\ in
    untime/CMakeLists.txt\ under \if(WIN32).

Verification

  • Claimed in #1608: \RT-PIPELINE-CHECKPOINT-GUARDS-AND-TESTS\ (claim comment: #1608).
  • Compiled and executed \d3d12_pipeline_checkpoint_test\ with MinGW C++20: all test categories 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)

**@⁠abnalstlll-byte** on GitHub · 2026-11-25 19:42 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2081) `abnalstlll-byte:feat/rt-pipeline-checkpoint-guards-and-tests` → `main` · +166 −1 · 3 files · 1 commits · open ### Summary - Added input validation guards and helper accessors in \ untime/shims/d3d12_pipeline_checkpoint.h\: - \CacheStagingFile\: gracefully rejects empty destination and 0-byte mappings. Added \is_valid()\ and \ emp_path()\ accessors. - \publish()\: validates non-null data and non-empty destination prior to unmapping and moving. - Added pure helper \is_direct_session_cache_enabled(val, len)\ to inspect environment strings. - Added comprehensive unit test suite in \ untime/test/d3d12_pipeline_checkpoint_test.cpp\: - Tests \CompileActivity\ RAII counter under single-threaded and multithreaded concurrency. - Tests \is_direct_session_cache_enabled\ across edge cases. - Tests \cache_temp_suffix\ across valid and malformed suffixes. - Tests \CacheStagingFile\ invalid arguments, publish workflow, and RAII abort cleanup. - Tests \clean_stale_cache_files\ edge cases. - Registered \d3d12_pipeline_checkpoint_test\ in \ untime/CMakeLists.txt\ under \if(WIN32)\. ### Verification - Claimed in #1608: \RT-PIPELINE-CHECKPOINT-GUARDS-AND-TESTS\ (claim comment: https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608). - Compiled and executed \d3d12_pipeline_checkpoint_test\ with MinGW C++20: all test categories 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)
Add input validation guards to CacheStagingFile in runtime/shims/d3d12_pipeline_checkpoint.h for empty destination and zero bytes, and add is_direct_session_cache_enabled helper. Add a unit test suite in runtime/test/d3d12_pipeline_checkpoint_test.cpp and register it in runtime/CMakeLists.txt.

Claimed in #1608: RT-PIPELINE-CHECKPOINT-GUARDS-AND-TESTS.

AI-assisted (Claude Code)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:17:09 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2081/head:github-bot/gh-2081'
git switch 'github-bot/gh-2081'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2081'
git switch 'github-bot/gh-2081'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2081'
git switch 'github-bot/gh-2081'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2081'
git switch 'main'
git merge --squash 'github-bot/gh-2081'
git switch 'main'
git merge --ff-only 'github-bot/gh-2081'
git switch 'main'
git merge 'github-bot/gh-2081'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.