Repository navigation
feat(tools): resolve NID names with a cached database only - #12876
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
malekaifa
left a comment
There was a problem hiding this comment.
Reviewed exact head 5c674b7 against current main bb04a4f. Current-main merge-tree and git diff --check are clean. The new offline tests pass 3/3 on Windows Python 3.12 and WSL Python 3.12.3, and the existing NID suite passes 48/48 on both. The argument normalization is sound: name/symbol/from-file computation returns before DB access, an explicitly empty --nid lookup uses no DB, and real offline NID lookups use read_db directly so a cache disappearing after is_file cannot fall back to download. I also merged this head synthetically with live #12494; the tree is clean and preserves read_db for offline plus #12494's bounded urlopen downloader online. If #12494 lands first, please refresh the two offline network-guard mocks from urlretrieve to urlopen so they continue detecting accidental downloader entry; production integration itself is clean. Hosted eligibility, conventions, intake, labels, Ubuntu/Windows relinker, Windows and ASan are green; only generic macOS relinker jobs are queued. No blocking issue found.
malekaifa
left a comment
There was a problem hiding this comment.
Re-reviewed after #12494 merged. The two offline network guards still patch urlretrieve, but current main now downloads through urlopen(..., timeout=DOWNLOAD_TIMEOUT), so those guards no longer prove the offline path blocks network access. Please integrate current main, update both guards to patch urlopen, rerun test_nid_offline plus the existing NID suite, and re-request review. The production offline logic itself still looks structurally compatible; this request is about restoring the negative test coverage against the current download path.
|
Updated to Addressed the current-main review request: both offline network guards now patch The missing-cache and cache-disappearing tests both execute. Bypassing offline mode in the actual production module makes each test fail at its Exact-head validation: Python 3.12 and 3.14 on Windows and Linux, 4/4 focused registered CTest groups passed in all four configurations, 68 unittest methods per configuration, slowest group 3.52 s. No Python or CTest skips in any configuration. Current-main conventions, whitespace, Python 3.9 grammar and script registration pass. Final hosted results for this exact updated head are recorded below. This PR has now merged. AI-assisted: yes. Final hosted CI completion (verified 2026-11-13) for
Skipped jobs (not counted as passes): The verified head was merged at |
|
Tested
AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports. |
malekaifa
left a comment
There was a problem hiding this comment.
Re-reviewed exact head 393ca87. The prior blocker is resolved: both offline negative guards now intercept urlopen, matching the current downloader, and the offline path reads an existing cache directly instead of falling back to download. Local Windows Python 3.12 validation passed tools/tests/test_nid_offline.py (3/3) and the existing tools/tests/test_nid_names.py suite (63/63); git diff --check is clean. Hosted checks have no failures. Approved.
What
Add
nid_names.py --offline: read an existing cached database directly, reject a missing cache without creating directories, and keep symbol-to-NID calculation independent of the database. Directread_db()prevents a cache disappearing between its file check and read from falling back to a download.Integrate current main after #12494 merged and update both negative network guards to patch the downloader's actual
urllib.request.urlopenentry point. Preserve main's bounded/atomic online downloader. The missing-cache and disappearing-cache tests now intercept the current network path.The database can be stale or incomplete; offline mode does not establish firmware authority. No open prerequisite remains.
Tested
Exact tested head:
393ca873d723aaa4bea6377df62913d44fbcd657, including mainac94ac850371e12cde7048c3db59135e19a869c3.Windows 11 / MinGW GCC 15.2 / CMake 4.3.1 / Python 3.14.3 and 3.12.14; WSL Ubuntu 26.04 / GCC 15.2 / CMake 4.2.3 / Python 3.14.4 and 3.12.16. Real CMake/Ninja Release configurations use
ANYPS5_RELINKER_ONLY=ON,BUILD_TESTING=ONand each selected interpreter.ctest --test-dir BUILD -R '^(tools_nid_offline|nid_database_cache|tools_nid_name_audit|test_script_registration)$' -V --output-on-failure --no-tests=error: all 4 registered groups pass in each of the four configurations; 68 unittest methods per configuration. Slowest selected group: 3.52 s. No CTest group is skipped.AssertionError: network accessfrom itsurlopenguard. An independent harness prevents unmocked network access. The committed implementation passes.No full product build, local macOS runtime, PS5/title run or GPU validation is claimed. Hosted results for the new head are reported separately after publication; earlier-head checks are not substituted.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)