Repository navigation
fix(daemon): resolve test-emu project_dir against the caller's cwd (#1415) - #1591
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reachedNext included review available in 40 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: FastLED/fbuild/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: FastLED/fbuild/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe emulator test handler now resolves the request’s project directory using the optional caller working directory. Its operation-guard label and missing-directory error use the resolved path. Tests cover relative and missing project directories. ChangesEmulator project directory resolution
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to No actionable issue remains; the change is ready to merge after normal checks. Architecture SummaryArchitecture risk: 🟡 Medium · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
Reliability and maintainability
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
Refs #1415.
build, deploy and install_deps already resolve
project_dirviaresolve_request_project_dir;POST /api/test-emuwas the remaining handler reading the raw string against the daemon's own cwd, so a second project'stest-emuwithin the daemon idle window ran the first project's sketch. It now uses the same resolver, and its lock/error text names the resolved absolute path.Regression tests (
tests_project_dir.rs):project_dir: "."withcaller_cwdelsewhere reads the caller'splatformio.ini(the daemon cwd has none); a missing relative dir reports the resolved path.Not covered here: the monitor/reset handlers don't take a project_dir from what I found; the issue can be closed once this merges unless you know of others.
Summary by CodeRabbit