fix(paths): resolve project directories from the working directory 🤖🤖🤖 - #283
fix(paths): resolve project directories from the working directory 🤖🤖🤖#283Sampoornnagpal wants to merge 2 commits into
Conversation
Signed-off-by: Sampoorn Nagpal <nagpalsampoorn@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthrough
ChangesProject root discovery
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Project-directory discovery now selects the nearest pyproject.toml from the working directory upward while retaining the override and fallback behavior. No merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Signed-off-by: Sampoorn Nagpal <nagpalsampoorn@gmail.com>
What does this PR do?
In an editable install,
get_project_dir()resolves.nooaunder the framework checkout even when called from another project. Project configuration, sessions, and generated libraries can therefore use the wrong project's directory.Search upward from the working directory, including that directory, for the nearest
pyproject.toml. This matches the existing implementation and rationale innooa_cli._common.find_project_root(). Preserve the working-directory fallback andNEMO_OO_PROJECT_DIRoverride; no import dependency on the optional CLI is added.Validation
Four regression cases fail before the fix. Afterward all 6 path tests pass. The related config-chain suite has 15 passing tests and one existing Windows failure because this host cannot create the symlink required by
test_symlink_dedup.Command:
uv run pytest -q tests/test_paths.py tests/test_llm_config_chain.py— 21 passed, 1 platform-dependent failure as above.Windows/Python 3.12 with external import-only helpers for #84/#85 (
fcntl/SIGUSR2). Helpers are not included and do not validate POSIX locks/signals.Related issues
No matching open issue found.
Checklist
Summary by CodeRabbit
Bug Fixes
Tests