Repository navigation
feat(tools): optionally reject partially implemented imports - #12877
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 bde8fdc against current main bb04a4f. The current-main merge-tree and git diff --check are clean. The new strict-partial feature tests pass 2/2 on Windows Python 3.12 and WSL Python 3.12.3, and the full existing test_import_audit.py suite remains green: 159 tests on Windows (5 existing skips) and 159 on WSL (2 existing skips). The fixture pins the intended policy boundary: default partial classification stays non-failing, --strict-partial upgrades that same record to exit 1, replacing the source with an ordinary implementation returns to 0, and malformed input remains status 2. Hosted eligibility, conventions, intake, labels, Ubuntu/Windows relinker, Windows and ASan are green; only generic macOS relinker jobs are queued. I found no blocking issue in this optional audit policy flag.
What
Adds optional
import_audit.py --strict-partial, which fails when the existing audit classifies a referenced import as partial. Default classification, JSON output and --strict-stubs/--strict-providers policies are retained.Implementation basis: Uses the existing partial classification and summary counts rather than inferring unsupported input values. A real synthetic ELF export, registry and source tree produce a partial record: default succeeds, strict-partial fails, and replacing the source fixture with an ordinary implementation succeeds.
Known limits: Partial is the existing static classification, not proof that the title reaches an unsupported path. The fixture exercises the auditor and does not execute its synthetic exported function.
Existing implementation/schema: tools/import_audit.py
Exact topic head
bde8fdc20c06267e5c98c148e98b368b304d9b89is one independent commit on main5454cd2e455994d992aca39335ce60507eeda1eb. The repository overlap checker against5454cd2e455994d992aca39335ce60507eeda1ebreported no confirmed overlap. It could not complete shared-file comparisons for older PRs already conflicting with main: #674, #1835, #3786, #5021, #7454, #9508, #9539. Scoped file diffs were reviewed separately. 5 file changes projected onto main and then combined with this topic without a new conflict; 2 peer file changes already conflict with main and are not claimed automatically mergeable. They do not provide this feature or test matrix. The new test has its own source and registration, with no required landing order. If shared registration code changes before landing, this branch needs refreshed merge and affected test checks. Depends on: none. The 20 independent topics also merged together into tested integration81a0f73e5972352ba2b50ce53077921c51112273on the same main.Tested
Tested topic head:
bde8fdc20c06267e5c98c148e98b368b304d9b89. Final combined integration:81a0f73e5972352ba2b50ce53077921c51112273, main5454cd2e455994d992aca39335ce60507eeda1eb. Ubuntu/WSL GCC 15.2, CMake 4.2.3, Python 3.14.4; Windows MinGW GCC 15.2, CMake 4.3.1, Python 3.14.3.python tools/tests/test_audit_strict_partial.py: 2 tests passed on each platform, no skips. The focused registered CTesttools_audit_strict_partialpassed on both platforms. A mutation in the actual tool code was rejected by this fixture.cmake --build <full-linux-build> --parallel 8: full Linux default product build passed, including a final build at the integration above. Windows used the full configuration and built the affected libc/test targets and relinker with--parallel 8; a complete default Windows build is not claimed.ctest --test-dir <build> -R "^(tools_sanitizer_json|tools_annotation_symbols_json|tools_compile_plan|tools_catalog_json|tools_nid_offline|tools_audit_strict_partial|tools_intervals_complete|tools_pad_preview|tools_release_notes_check|tools_progress_diff_json|guest_memmove_snapshot|guest_memcpy_protected|guest_memcmp_protected|guest_span_protected|guest_substring_protected|guest_tokenizer_protected|guest_strncpy_protected|guest_strncat_protected|guest_wmemmove_snapshot|guest_wide_length_protected)$" -j 8 -V --output-on-failure: 20/20 passed on each platform, zero skips. Conventions, whitespace, script registration and the public-header audit passed. No PS5/title execution or GPU validation protocol was run; macOS and hosted full-build CI are not reported as passed.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)