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.
… its prompt (#1946)
## Why
The deliver orchestrator walks a fixed path in prose after every stage
report: 7.4 Opus turns per stage, 24–34% of delivery spend. In 9 of 24
replayed deliveries the first build spawn was refused for its ledger
line. Two finished fixes were parked because a review round ran no lens.
## What
- `.agents/scripts/deliver-step.mjs <pr|issue> --report <file>` reads
the report, `pr-shas.sh` and `ci-triage.mjs`, re-runs flaky or unknown
CI, writes `### Status`, and prints the next stage's whole prompt,
`decide:`, `finish:`, `gate:`, `park:` or `done:`.
- Every prompt it prints carries the ledger line the guard accepts.
- A round 1 or 2 reported incomplete with no lens started runs once
more; a second incomplete parks.
- The `deliver` skill runs the script after every stage. Skill and
`feature.md`: 435 lines before, 323 after. The push-notification line is
gone (#1943).
## Proof
```
replay: every stage report of 24 sandbox deliveries and 85 real deliver
sessions (2026-11-15..28), fed to the script with the state folded from
the issue's earlier reports
path, sandbox: 114/126 same path, real: 437/488 same
differences (sandbox 24, real 107): the script follows the rules in 79,
an ADR flip adr-flip.mjs now does in 14, the orchestrator's own call
(--fix, --hardware, its own park) in 38; none where the script breaks a rule
142 real reports of PRs resumed mid-way were not replayed
starts: 75 first spawns, all pass tool-guard.mjs; recorded: 29 refused
change 3: 6 cases (#77, #103 and 4 real), each gets one rerun
--report <output-file>: 765 of 770 agent transcripts yield the notification's
report; lens counts 284 of 284
turns: 5.7 per stage (sandbox), 7.4 (real); report to next spawn median 2,
p90 7. Absorbed calls: 615 pr-shas/ci-triage, 249 Status writes, 50 reruns
src/deliver-step.test.ts: 56 tests; every review fix fails its test by mutation
live: one sandbox delivery at 00bc26e (real PR #1672) merged in 26.7 min,
11 sub-agent runs, one deliver-step.mjs call between each report and the
next spawn, 0 refused spawns (2 in each of 3 earlier runs), a red gate
handled by fix run and fix-check
```
Not verified, next step: fewer orchestrator calls per spawn overall
(3.0, as before); 15 of 32 calls are preflight, Done when ticks, ready
and gate, ledger and the run report. Raw agreement is under the 95% the
proposal set.
## Review
Spec review: skipped. Code review: 13 blocking, 13 fixed, 0 notes.
Claims review: 2 blocking, 2 fixed, 0 notes.
Rounds: 5. Tokens: 6.7M.
Assessment: complete
*Written by an agent.*
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.