Skip to content

fix(ports): the daemon launch works when SIMLOCK_HOME sits under a drive root - #1672

Merged
V3RON merged 2 commits into
mainfrom
bug/1663
Nov 17, 2026
Merged

V3RON merged 2 commits into
mainfrom
bug/1663

Conversation

@V3RON

@V3RON V3RON commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1663

Status

Implement: done (1/1 green) Review: round 1 passed, 0 findings Hardware: n/a Gate: running

  • 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 81aac6a SIMLOCK_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.

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.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Explain Change →

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: Passed 4

Check name Status Explanation
Title check Passed 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 Passed 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 Passed 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 Passed 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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • 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.

@V3RON

V3RON commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: 81aac6a

Runs: 6. Cost USD: 1.0404. Agent seconds: 689.
Tokens input 88, output 20745, cache read 1317161, cache write 216215.
- build implementer: claude-sonnet-5-5 73 s $0.141
- audit implementer: claude-sonnet-5-5 326 s $0.1632
- review 1 reviewer: claude-sonnet-5-5 163 s $0.2368
- review 1 spec: claude-sonnet-5-5 23 s $0.1015
- review 1 claims: claude-sonnet-5-5 28 s $0.0769
- review 1 code both: claude-opus-5-5 76 s $0.321
Finding outcomes: {}. Classes: {}.
{"findings":[]}

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review November 17, 2026 14:47
@V3RON
V3RON merged commit bb6b0f9 into main Nov 17, 2026
100 of 102 checks passed
@V3RON
V3RON deleted the bug/1663 branch November 17, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On Windows a SIMLOCK_HOME directly under a drive root fails every command with EPERM mkdir

1 participant