test: add comprehensive test coverage for IPC, platform, and services#66
Merged
test: add comprehensive test coverage for IPC, platform, and services#66
Conversation
…, and services Adds 48 test files with ~1,100 new tests covering previously untested critical areas: - **IPC handlers** (18 files): privacy-shield, startup-manager, browser-cleaner, app-cleaner, database-optimizer, file-shredder, disk-analyzer, debloater, registry-cleaner, service-manager, network-cleanup, recycle-bin, shortcut-cleaner, empty-folder-cleaner, software-updater, program-uninstaller, uninstall-leftovers, cloud-agent - **Platform darwin** (11 files): browser, commands, elevation, malware, malware-paths, network, paths, privacy, security, services, startup - **Platform linux** (9 files): browser, commands, malware, malware-paths, paths, privacy, security, services, startup - **Platform win32** (9 files): browser, commands, elevation, malware, network, privacy, security, services, startup - **Services**: extended program-uninstaller tests from 27 to 103 cases Total test suite: 84 files, 1,887 tests all passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b22af16284
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Replace hardcoded Unix path separators with path.join()/path.resolve() in test assertions and fix two source files (linux/malware-paths.ts, linux/startup.ts) that used hardcoded forward slashes for path construction. Fixes 48 test failures on Windows CI: - darwin: malware-paths (15), paths (1), startup (11) - linux: malware-paths (7), paths (4), startup (3) - IPC: browser-cleaner (3), debloater (3), program-uninstaller (1) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The 'component store corruption' check matched before 'No component store corruption detected' since the former is a substring of the latter. Reorder the conditionals so the more specific check runs first. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The darwin malware-paths and startup modules used hardcoded '/' in path prefix strings, causing tests to fail on Windows CI where path.resolve() produces backslash separators. Use join() + sep for cross-platform path construction, matching the fix already applied to the linux platform. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The startup module's path validation used raw homedir() and hardcoded '/Library/LaunchAgents' in allowedDirs, but compared against resolve(normalize(location)). On Windows, resolve() prepends the drive letter, so the startsWith check always failed. Fix: resolve(homedir()) for HOME, resolve() the global path constant, and update the test to match. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dbfx
added a commit
that referenced
this pull request
Mar 24, 2026
…all tools
Windows PowerShell outputs UTF-16-LE and native tools (reg.exe, netsh,
pnputil, schtasks, sfc, dism) use the system's OEM code page (e.g.
CP1252). Node.js decodes stdout as UTF-8 by default, corrupting accented
characters like "Système" → garbled text in drive labels and elsewhere.
- Add exec-utf8.ts: central utility with psUtf8() for PowerShell and
execNativeUtf8() for native tools (chcp 65001 + cmd.exe arg escaping)
- Wrap all PowerShell -Command calls with psUtf8() (25 files)
- Route all reg/schtasks/pnputil/netsh calls through execNativeUtf8()
- Fix SFC/DISM streaming with StringDecoder for multi-byte UTF-8 chunks
- Update ASCII-only regex patterns to Unicode-aware (\p{L}\p{N}/u) so
accented display names are no longer silently rejected
- Harden execNativeUtf8 against cmd.exe shell injection by escaping
metacharacters in dynamic arguments (registry names, task paths, etc.)
Closes #66
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
What's covered
Tier 1 — Security & Stability Critical
Tier 2 — IPC Handlers (18 new test files)
Tier 3 — Platform-Specific Code (29 new test files)
Test plan
npx vitest run)🤖 Generated with Claude Code