Fix audit findings L3, L5: LIBSTATS_PORTABLE, cache doc accuracy, remove CachedProperty#64
Merged
Merged
Conversation
…cy; remove CachedProperty L3: LIBSTATS_PORTABLE=OFF option wraps the global /arch: block on Windows. L5: Fix lock-free doc claim; add torn-pair note; remove CachedProperty<T>. 46/46 tests pass. Co-Authored-By: Oz <oz-agent@warp.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses findings L3 and L5 from the 2026-07-04 audit. 46/46 tests pass. No API changes.
L3 — Windows global
/arch:scopingAdds
LIBSTATS_PORTABLE=OFFoption. WhenON, wraps theadd_compile_options(/arch:AVX512|AVX2)block (MSVC/Clang-cl x64) so those flags are not applied globally. Per-file ISA flags fromcmake/SIMDDetection.cmake:apply_simd_source_flags()remain active on the SIMD kernel TUs, preserving kernel performance. DefaultOFF(native build). RecommendONfor pylibstats Windows wheel builds.L5 — Sync complexity documentation
getCachedValue()checkscacheValidAtomic_without a lock (avoiding the exclusive/write lock on the fast path), but still acquiresshared_lockto read cached values. Correctly described as 'contention-reduced' not 'lock-free'.atomicMean_, etc.) are individually consistent, but reading two across separate calls does not form an atomic pair under concurrentsetParameters(). Added one-sentence note for callers needing a consistent pair.CachedProperty<T>: defined indistribution_cache.h, zero usages anywhere in src/ or include/. Removed (net −36 lines).