fix(tools): publish NID database cache after download completes #1328

Merged
darhebkf merged 1 commit from upstream-pr/1328 into main 2026-10-10 01:00:27 +00:00
darhebkf commented 2026-10-07 23:38:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by darhebkf on 2026-10-07T23:38:14Z.


What

An interrupted download leaves a partial NID database that subsequent runs reuse. Download into a closed temporary file in the cache directory, publish it only after success, and clean up on failure. Register the four failure, retry and successful-cache regressions with CTest.

Tested

Rebased onto main d70b8998. macOS 15.7.3, Apple Silicon, AppleClang 17, Python 3.14.6. nid_database_cache passed through CTest, covering four regressions. The new group took 0.10 s locally.

The shared upstream C++ relinker sources were built in Release during this review; subsequent tool-only branches ran their affected CTest groups. Conventions and whitespace checks pass for each branch. Full Linux/Windows runtime validation requires a maintainer-dispatched Build run; no title or homebrew was executed.

Checklist

  • Based on current main; no other open PR implements the same fix.
  • One topic per PR; this remains the same fix with its regression tests.
  • No source comments added; comment text in test fixtures is string data.
  • Unimplemented paths throw; no runtime exports or silent stubs added.
  • No notes, investigation files or images added to the repository.
  • No new third-party code.
  • Generic behaviour, not specific to one title.
  • New test groups finish well below 30 s locally; CI-runner timings remain unverified.
  • Depends on: none.
  • AI-assisted: yes.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4779787141 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1328). Originally posted by [darhebkf](https://github.com/darhebkf) on 2026-10-07T23:38:14Z. --- ### What An interrupted download leaves a partial NID database that subsequent runs reuse. Download into a closed temporary file in the cache directory, publish it only after success, and clean up on failure. Register the four failure, retry and successful-cache regressions with CTest. ### Tested Rebased onto main `d70b8998`. macOS 15.7.3, Apple Silicon, AppleClang 17, Python 3.14.6. nid_database_cache passed through CTest, covering four regressions. The new group took 0.10 s locally. The shared upstream C++ relinker sources were built in Release during this review; subsequent tool-only branches ran their affected CTest groups. Conventions and whitespace checks pass for each branch. Full Linux/Windows runtime validation requires a maintainer-dispatched Build run; no title or homebrew was executed. ### Checklist - [x] Based on current `main`; no other open PR implements the same fix. - [x] One topic per PR; this remains the same fix with its regression tests. - [x] No source comments added; comment text in test fixtures is string data. - [x] Unimplemented paths throw; no runtime exports or silent stubs added. - [x] No notes, investigation files or images added to the repository. - [x] No new third-party code. - [x] Generic behaviour, not specific to one title. - [x] New test groups finish well below 30 s locally; CI-runner timings remain unverified. - [x] Depends on: none. - [x] AI-assisted: yes.
adriadam10 commented 2026-10-09 23:11:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T23:11:10Z.


Checked: the temp-file + replace flow leaves no partial cache on failure, the four regressions are registered in ctest, and nid_database_cache fails without the nid_names.py change. Full build + ctest green after the rebase (555/555).
Rebased onto main (test-list adjacency in CMakeLists.txt with pr_overlap_exports); merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6090825892 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1328#issuecomment-6090825892). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-09T23:11:10Z. --- Checked: the temp-file + `replace` flow leaves no partial cache on failure, the four regressions are registered in ctest, and `nid_database_cache` fails without the `nid_names.py` change. Full build + ctest green after the rebase (555/555). Rebased onto main (test-list adjacency in `CMakeLists.txt` with `pr_overlap_exports`); merging once CI is green.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!1328
No description provided.