Skip to content

Conversation

@supervoidcoder
Copy link
Owner

@supervoidcoder supervoidcoder commented Feb 11, 2026

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Improved process name matching to be case-insensitive, enabling more reliable process identification regardless of name capitalization
    • Enhanced executable file extension handling for more consistent process lookup results

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 11, 2026

Walkthrough

Modified process lookup logic in findMyProc to perform case-insensitive comparisons and handle missing ".exe" suffixes, while updating corresponding test cases to remove ".exe" extensions from measured process names.

Changes

Cohort / File(s) Summary
Process Lookup Logic
main.cpp
Modified findMyProc to lowercase process names and perform case-insensitive comparison, ensuring the target process matches regardless of case or missing ".exe" suffix. Previous direct comparison logic removed.
Test Cases
tests/process/process.ps1
Updated process name references to remove ".exe" suffixes across all measured processes (winlogon, lsass, explorer, svchost, powershell, cmd, pwsh, etc.), with dllhost test entry removed entirely.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • supervoidcoder/win-witr#80: Modifies findMyProc process-matching logic to return multiple matches and cache names, related to similar functionality changes in this PR.

Suggested labels

enhancement, ready-for-review, priority: medium, windows

Poem

🐰 A case-insensitive hop and skip,
Process names no longer slip,
With or without the ".exe" tail,
The finder's hunt will never fail!
Tests align with logic true—
Case-sensitivity bid adieu! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: making process name matching case-insensitive and enabling it to work without the .exe extension.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch better-name-parsing

No actionable comments were generated in the recent review. 🎉


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@supervoidcoder supervoidcoder marked this pull request as ready for review February 11, 2026 13:42
@supervoidcoder
Copy link
Owner Author

@coderabbitai did i cook with this pr 😎 🔥 :shipit:

@coderabbitai coderabbitai bot added enhancement New feature or request priority: medium Medium priority ready-for-review Ready for review windows Windows-specific issues labels Feb 11, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 11, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get PR details including files changed and the diff
gh pr view 81 --json title,body,files,additions,deletions

# Get the actual diff to review the changes
gh pr diff 81

Length of output: 7260


@supervoidcoder You absolutely cooked with this one! 🔥

The implementation is solid:

Case insensitivity: Clean use of std::transform with tolower on both the search term and process names for comparison

Extension handling: Smart logic that automatically adds .exe if not provided, then checks both variants (exeName == ex || exeName == procstr)

Comprehensive testing: Updated all the PowerShell tests to validate the new behavior works without extensions

The dual comparison approach is particularly nice - it handles edge cases where users might provide the extension even though it's now optional. And I see you caught yourself almost typing endsWith from the JavaScript mind virus 😄

Minor note: There's some inconsistent indentation (mix of tabs/spaces) in the new code block, but functionally this PR delivers exactly what it promises.

Verdict: You definitely cooked 👨‍🍳✨


🧠 Learnings used
Learnt from: supervoidcoder
Repo: supervoidcoder/win-witr PR: 48
File: README.md:38-38
Timestamp: 2026-01-21T01:52:33.870Z
Learning: For supervoidcoder's README files in the win-witr repository: The user prefers an intentionally informal, humorous tone with casual language. Grammar formality suggestions (like "anyways" vs "anyway") should be skipped as they don't align with the intentional style of the documentation.

Learnt from: supervoidcoder
Repo: supervoidcoder/win-witr PR: 58
File: main.cpp:380-400
Timestamp: 2026-01-29T22:00:51.099Z
Learning: In the supervoidcoder/win-witr repository, the user intentionally uses meme/humorous spellings in code comments (e.g., "vroken" instead of "broken") as part of an informal coding style. These should not be flagged as typos.

@supervoidcoder
Copy link
Owner Author

@coderabbitai yeah i made it check both variants because there are still some procesess that just don't have exe extensoins, such as "System", "Registry" "Memory Compression" "Secure System"

also whta do you think of the JavaScript thing lol

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 11, 2026

Tip

For best results, initiate chat on the files or code changes.

@supervoidcoder Ah yes, that makes perfect sense! Those special system processes (System, Registry, Memory Compression, Secure System) are indeed in a league of their own - they're kernel-mode processes that don't follow normal .exe naming conventions. Smart call to handle both cases so the tool can find literally everything running on the system. 💯

As for the JavaScript thing - the fact that you caught yourself mid-thought and left that comment in there is honestly hilarious 😂 It's like a little window into the mental context-switching every dev goes through. Going from JavaScript where you'd just do processName.endsWith('.exe') to C++ where you're doing manual string comparisons... the struggle is real. I respect the transparency of leaving that thought in the code as a comment - it's the kind of thing that makes code reviews more human. Plus it gave me a good laugh while reviewing!

The multi-language brain wrestle is so relatable. One minute you're thinking in JS arrow functions, the next you're back to explicit loops and string manipulation. 🧠💥


🧠 Learnings used
Learnt from: supervoidcoder
Repo: supervoidcoder/win-witr PR: 0
File: :0-0
Timestamp: 2026-02-10T03:14:44.222Z
Learning: In supervoidcoder/win-witr PR `#80`, the user implemented a "Related Processes" feature to handle duplicate process names. When multiple processes match a name, the tool shows the first found process as the main output, then lists all other matches below in a "Related Processes:" section showing both process name and PID. This is non-interactive and uses colored output (magenta header, cyan names, gray PIDs).

Learnt from: supervoidcoder
Repo: supervoidcoder/win-witr PR: 0
File: :0-0
Timestamp: 2026-02-11T00:35:55.979Z
Learning: In supervoidcoder/win-witr PR `#80`, the user optimized the "Related Processes" feature by ~5x (from ~125ms to ~25ms for 78 related processes). The bottleneck was calling GetProcessNameFromPid for every related process when displaying them. The fix: modified findMyProc to return a struct containing both PIDs and process names, storing the name during the initial Process32Next loop when pe.szExeFile is already available. This eliminated 78+ redundant Win32 API calls for svchost.exe, demonstrating a "cache what you already have" optimization strategy.

Learnt from: supervoidcoder
Repo: supervoidcoder/win-witr PR: 58
File: main.cpp:380-400
Timestamp: 2026-01-29T22:00:51.099Z
Learning: In the supervoidcoder/win-witr repository, the user intentionally uses meme/humorous spellings in code comments (e.g., "vroken" instead of "broken") as part of an informal coding style. These should not be flagged as typos.

Learnt from: supervoidcoder
Repo: supervoidcoder/win-witr PR: 0
File: :0-0
Timestamp: 2026-02-03T17:13:43.760Z
Learning: In supervoidcoder/win-witr, the user successfully implemented complete cross-architecture PEB reading support for command line extraction. The implementation handles all architecture combinations: ARM64→ARM64, x64→x64, x86→x86, x64→x86 (via WoW64), x86→x64 (using undocumented ntdll functions for "virtual" memory access), and ARM64→WoW64. This required ~700 lines of code but avoids WMI's 200ms per-query overhead, making it significantly faster than the original PowerShell witr's Get-CimInstance approach.

Learnt from: supervoidcoder
Repo: supervoidcoder/win-witr PR: 48
File: README.md:38-38
Timestamp: 2026-01-21T01:52:33.870Z
Learning: For supervoidcoder's README files in the win-witr repository: The user prefers an intentionally informal, humorous tone with casual language. Grammar formality suggestions (like "anyways" vs "anyway") should be skipped as they don't align with the intentional style of the documentation.

@supervoidcoder supervoidcoder linked an issue Feb 11, 2026 that may be closed by this pull request
@supervoidcoder
Copy link
Owner Author

broski rabbit thinks it can laugh 🤣🤣🤖🤖🤖

@supervoidcoder supervoidcoder merged commit bbd2919 into main Feb 11, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: medium Medium priority ready-for-review Ready for review windows Windows-specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

better name parsing

1 participant