You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ports): the daemon launch works when SIMLOCK_HOME sits under a drive root - #1672
A SIMLOCK_HOME such as D:\simlock works — the test starts the daemon when the folder holding SIMLOCK_HOME exists but refuses mkdir is red without the stat guard; on Windows at 81aac6aSIMLOCK_HOME=D:\simlock1663 simlock doctor exits 0 with no findings, and that test passes there.
Assumptions
Assumption: updater-launcher.ts:30 has the same mkdir shape — left alone; its parent is the log folder under the home, never a drive root.
No actionable comments were generated in the recent review.
Walkthrough
createDataDirectory now checks whether the parent is a directory before attempting recursive creation. The test suite mocks mkdir and covers an EPERM response for the parent path. It verifies that launching resolves and that the child writes to its log.
Suggested reviewers:leonardoxr
Severity of issue fixed: Medium
Merge Risk: Minimal · up to 81aac
The change lets daemon startup work when SIMLOCK_HOME sits directly under a Windows drive root. No actionable merge-blocking risk remains.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: the daemon launch now works when SIMLOCK_HOME sits directly under a drive root. The raw summary confirms the createDataDirectory change adds a parent-directory stat ch…
Description check
The description links issue #1663, states the Windows case (SIMLOCK_HOME=D:\simlock) and the failing-then-passing test, and notes that updater-launcher.ts was left unchanged with a reason. It relates …
Linked Issues check
Issue #1663 (directly linked) requires that a SIMLOCK_HOME directly under a drive root, such as D:\simlock, works when the daemon starts. The original failure came from createDataDirectory in src/port…
Out of Scope Changes check
The whole-PR diff (merge base 23cfd6f to head 81aac6a) changes two files. src/ports/daemon-launcher.ts adds the stat guard in createDataDirectory, with a why comment tied to the drive-root EPERM. sr…
Full details: Title check
Explanation
The title names the main change: the daemon launch now works when SIMLOCK_HOME sits directly under a drive root. The raw summary confirms the createDataDirectory change adds a parent-directory stat check before recursive mkdir, and the test covers the EPERM case. The title is specific and matches the linked issue #1663 and the objectives.
Full details: Description check
Explanation
The description links issue #1663, states the Windows case (SIMLOCK_HOME=D:\simlock) and the failing-then-passing test, and notes that updater-launcher.ts was left unchanged with a reason. It relates directly to the changeset, so the check passes under the lenient criteria.
Full details: Linked Issues check
Explanation
Issue #1663 (directly linked) requires that a SIMLOCK_HOME directly under a drive root, such as D:\simlock, works when the daemon starts. The original failure came from createDataDirectory in src/ports/daemon-launcher.ts calling mkdir(dirname(directory), { recursive: true }) on a drive root. At head, createDataDirectory first calls stat(parent) and only runs the recursive mkdir when stat fails or the parent is not a directory. For D:\ the stat succeeds and the parent is a directory, so the EPERM call is skipped. The test 'starts the daemon when the folder holding SIMLOCK_HOME exists but refuses mkdir' covers this path. The issue's secondary note that other mkdirp calls may share the problem is hedged ('may'). The one other site, src/ports/updater-launcher.ts:30, creates dirname(logPath), which lies under the home log folder. Under the normal layout that parent is not a drive root, so the PR's decision to leave it unchanged is supported. The stat import already exists at head. No unfinished coding requirement is identified.
Full details: Out of Scope Changes check
Explanation
The whole-PR diff (merge base 23cfd6f to head 81aac6a) changes two files. src/ports/daemon-launcher.ts adds the stat guard in createDataDirectory, with a why comment tied to the drive-root EPERM. src/ports/daemon-launcher.test.ts adds a vi mock of node:fs/promises mkdir and a regression test for EPERM on the SIMLOCK_HOME parent. The test directly supports the fix. No unrelated change is identified. The updater-launcher.ts file is unchanged, which is not an out-of-scope change.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: QUIET
Plan: Advanced
Run ID: af2bd86a-af60-41d1-9a7c-e78c8425990c
Commits
Reviewing files that changed from the base of the PR and between 1ad68b8 and 81aac6a.
Files selected for processing: 2
src/ports/daemon-launcher.test.ts
src/ports/daemon-launcher.ts
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.
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
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.
Closes #1663
Status
Implement: done (1/1 green) Review: round 1 passed, 0 findings Hardware: n/a Gate: running
SIMLOCK_HOMEsuch asD:\simlockworks — the teststarts the daemon when the folder holding SIMLOCK_HOME exists but refuses mkdiris red without the stat guard; on Windows at 81aac6aSIMLOCK_HOME=D:\simlock1663 simlock doctorexits 0 with no findings, and that test passes there.Assumptions
updater-launcher.ts:30has the same mkdir shape — left alone; its parent is the log folder under the home, never a drive root.Review
Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 0 blocking, 0 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 1. Tokens: 1.5M.
Runs: 6. Cost USD: 1.0404. Agent seconds: 689.
Assessment: complete
Written by an agent.