Skip to content

fix: dashboard-build.sh never completes on Windows (race, npm ci node resolution, PATH truncation)#115

Open
smoochy wants to merge 2 commits into
ReflexioAI:mainfrom
smoochy:fix/issue-113-dashboard-build
Open

fix: dashboard-build.sh never completes on Windows (race, npm ci node resolution, PATH truncation)#115
smoochy wants to merge 2 commits into
ReflexioAI:mainfrom
smoochy:fix/issue-113-dashboard-build

Conversation

@smoochy

@smoochy smoochy commented Jul 6, 2026

Copy link
Copy Markdown

Ports three verified downstream fixes. Closes #113.

Summary by CodeRabbit

  • Bug Fixes
    • Improved dashboard build reliability by ensuring consistent tool resolution in child processes (including node/binaries).
    • Reduced unnecessary lock contention by more accurately detecting stale vs in-progress build locks and adjusting reclaim/backoff behavior accordingly.
    • Made dependency installation more robust by skipping package lifecycle scripts and improving clarity of install failures while still cleaning up partial installs.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 618ed871-0d48-440d-92a1-e645c480c8a9

📥 Commits

Reviewing files that changed from the base of the PR and between 798e570 and fa3e847.

📒 Files selected for processing (1)
  • plugin/scripts/dashboard-build.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • plugin/scripts/dashboard-build.sh

📝 Walkthrough

Walkthrough

Updated plugin/scripts/dashboard-build.sh to normalize PATH before npm runs, refine lock recovery when the pid file is absent, and change npm install/ci flags to skip lifecycle scripts while preserving existing cleanup and logging behavior.

Changes

Dashboard Build Script Fixes

Layer / File(s) Summary
PATH deduplication before npm invocation
plugin/scripts/dashboard-build.sh
Computes the resolved npm directory, deduplicates PATH in order, and anchors node-related entries at the front before invoking npm.
Lock acquisition race handling
plugin/scripts/dashboard-build.sh
Uses lock directory age with LOCK_ACQUIRE_GRACE to distinguish a peer still acquiring the lock from a crashed holder when the pid file is missing.
npm install flag changes
plugin/scripts/dashboard-build.sh
Removes --silent, adds --ignore-scripts, keeps --no-fund --no-audit, and preserves failure cleanup plus dashboard-unavailable logging.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main Windows dashboard-build fix and mentions the three root causes addressed.
Linked Issues check ✅ Passed The summarized changes address the three linked requirements: lock race handling, npm lifecycle-script resilience, and PATH deduplication.
Out of Scope Changes check ✅ Passed The change set is confined to dashboard-build.sh and stays focused on the linked Windows build failure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugin/scripts/dashboard-build.sh`:
- Around line 90-101: The lock-age check in dashboard-build.sh uses a GNU-only
stat form, so macOS/BSD cannot determine the lock directory creation time
correctly. Update the lock_born lookup in the lock-aging branch to handle both
stat -c %Y and a BSD-compatible fallback such as stat -f %m, keeping the
existing lock_now and LOCK_ACQUIRE_GRACE logic intact so stale pid-less locks
can still be reclaimed in the dashboard build flow.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 822b0100-f4f4-4010-8447-a09593a713b3

📥 Commits

Reviewing files that changed from the base of the PR and between 69fccb0 and 798e570.

📒 Files selected for processing (1)
  • plugin/scripts/dashboard-build.sh

Comment thread plugin/scripts/dashboard-build.sh
fix: portable lock-dir age lookup (GNU stat -c and BSD stat -f)

stat -c %Y is GNU-only; on macOS/BSD it fails, so lock_born fell back to
lock_now and an aged crashed lock was misread as "peer mid-acquire", stalling
the reclaim. Try BSD stat -f %m before the fallback.

Addresses CodeRabbit review on ReflexioAI#115.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@
@smoochy

smoochy commented Jul 6, 2026

Copy link
Copy Markdown
Author

Thanks for the review — addressed in fa3e847: the lock-dir age lookup now tries GNU stat -c %Y then BSD stat -f %m before the fallback, so it's portable across Linux/Git Bash and macOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant