feat: release-readiness hardening for v3.9.0#136
Conversation
|
Warning Review limit reached
More reviews will be available in 26 minutes and 36 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughDetourModKit v3.9.0 adds SEH-guarded write primitives ( ChangesDetourModKit v3.9.0
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/pr-check.yml:
- Line 35: The GitHub Actions in the pr-check.yml workflow are using tagged
versions (`@v4`) instead of commit SHAs, which creates security and
maintainability risks. You need to either pin each action to a specific commit
SHA (replace `@v4` with the full commit hash like `@abc1234def5678`) for all
affected actions including actions/cache and any others on lines 29, 35, 50, 61,
and 148, or add a Dependabot configuration to .github/dependabot.yml with
package-ecosystem set to github-actions to automatically manage these updates.
Choose one approach and apply it consistently across all GitHub Actions in the
workflow file.
In `@include/DetourModKit/bootstrap.hpp`:
- Around line 85-90: The public docblock for the on_dll_attach function is
missing the required API-discipline safety label. Add one of the three required
labels (Callback-safe, Setup/control-plane only, or Best-effort) to the
documentation comment above the function declaration to classify the call-site
safety according to the coding guidelines for public APIs.
In `@src/memory.cpp`:
- Around line 2132-2143: The seh_write_chain_bytes function contains two
unguarded std::memcpy calls (one for reading intermediate pointers and one for
the final write) that can cause ASan false positives, whereas the similar
seh_write_bytes function conditionally uses __movsb under __SANITIZE_ADDRESS__
guards to avoid this issue. Wrap both std::memcpy calls in seh_write_chain_bytes
with conditional compilation guards using `#if` defined(__SANITIZE_ADDRESS__),
routing to __movsb with unsigned char* casts when ASan is enabled and falling
back to std::memcpy otherwise, matching the exact pattern used in
seh_write_bytes.
In `@tests/test_memory.cpp`:
- Line 2624: The constant kSentinel uses the k-prefixed Google naming style
which the repository avoids. Rename kSentinel to SENTINEL to follow the
UPPER_SNAKE_CASE convention that the codebase requires for all constants. Update
all references to kSentinel throughout the test_memory.cpp file to use the new
SENTINEL name to maintain consistency with the repository's coding guidelines.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 95cb91bd-9e1d-4216-b5d7-f44f86e951ee
📒 Files selected for processing (34)
.github/workflows/pr-check.ymlAGENTS.mdCMakeLists.txtREADME.mddocs/misc/hot-path-memory.mdinclude/DetourModKit/async_logger.hppinclude/DetourModKit/bootstrap.hppinclude/DetourModKit/event_dispatcher.hppinclude/DetourModKit/hook_manager.hppinclude/DetourModKit/memory.hppinclude/DetourModKit/rtti.hppinclude/DetourModKit/rtti_dissect.hppinclude/DetourModKit/version.hpp.insrc/bootstrap.cppsrc/config.cppsrc/config_watcher.cppsrc/input_intercept.cppsrc/memory.cppsrc/memory_internal.hppsrc/rtti.cppsrc/rtti_dissect.cppsrc/scanner.cppsrc/scanner_cascade.cppsrc/scanner_internal.hppsrc/string_xref.cpptests/test_config.cpptests/test_memory.cpptests/test_memory_chain.cpptests/test_platform.cpptests/test_rtti_dissect.cpptests/test_rtti_reverse.cpptests/test_scanner.cpptests/test_string_xref.cpptests/test_version.cpp
Summary
Addresses the v3.9.0 release-readiness audit: closes the P0 blockers and the high-value hardening items so the toolkit can be tagged. Version bump is a MINOR because the change set adds public API.
project(VERSION)to 3.9.0 so the version header, ConfigVersion, and the release validate-version gate agree; widens theDMK_VERSIONinteger encoding.on_dll_attachnoexcept and fails closed throughunwind_early_attach_failure, closing a DllMain UB hole when an allocation throws during attach.seh_write/seh_write_bytes/seh_write_chain/seh_write_chain_bytes) with no protection flip, i-cache flush, or cache invalidation;write_bytesis now setup/patch-only with a gated per-call log.register_intrange check, the scanner incomplete-scan fail-closed signal, and input wheel-counter drain on re-bind.LogMessagezero-fill, moves async-logger internals behinddetail, and refreshes README/AGENTS/docs.Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores