mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #2061] runtime: guard empty destination and null data in write_pipeline_cache_file and add tests (RT-PIPELINE-CACHE-FILE-GUARDS-AND-TESTS) #2067
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2067
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2061
Author: @abnalstlll-byte
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:feat/rt-pipeline-cache-file-guards-and-tests📝 Commits (1)
ca0c72fruntime: guard empty destination and null data in write_pipeline_cache_file and add tests (RT-PIPELINE-CACHE-FILE-GUARDS-AND-TESTS)📊 Changes
2 files changed (+11 additions, -0 deletions)
View changed files
📝
runtime/src/pipeline_cache_file.h(+2 -0)📝
runtime/test/pipeline_cache_file_test.cpp(+9 -0)📄 Description
Claimed in the coordination issue as: RT-PIPELINE-CACHE-FILE-GUARDS-AND-TESTS (claim)
What and why
runtime/src/pipeline_cache_file.hprovides atomic, crash-safe checkpoint writes for the pipeline cache file via same-directory staging and renaming.Input guards:
write_pipeline_cache_file: returnsstd::errc::invalid_argumentimmediately ifdestination.empty()(preventing creation of orphan.tmp...files in the working directory) or ifsize > 0 && !data(preventing null pointer dereference instd::fwrite).size == 0(even ifdatais null).Test suite extension (
runtime/test/pipeline_cache_file_test.cpp):destination.empty()returnsstd::errc::invalid_argument.std::errc::invalid_argument.Tested
pipeline_cache_file_testpasses cleanly (exit 0).python -I tests/test_ci_registration.py: 16/16 pass.python -I tests/test_text_write_line_endings.py: 3/3 pass.python -I scripts/check_no_game_data.py: clean (0 violations, no game data).AI-assisted (Claude Code)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.