feat: support loading config from explicit path#78
Conversation
📝 WalkthroughWalkthrough
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
There was a problem hiding this comment.
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 `@packages/rstack/src/config.ts`:
- Around line 29-32: The documentation comment for configFilePath should
describe the actual fallback precedence: when the option is omitted, use the
CLI-provided state.configPath first, and perform default config-file discovery
only when that state path is unset. Update the wording near configFilePath
without changing implementation behavior.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 9ddd99ad-9c1d-46fb-be19-d0f8a14022ba
📒 Files selected for processing (5)
packages/rstack/src/config.tspackages/rstack/tests/config/load-state/explicit-dependency.tspackages/rstack/tests/config/load-state/explicit.config.tspackages/rstack/tests/config/load-state/fresh.config.tspackages/rstack/tests/config/load-state/index.test.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f83b47e3da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dad79428e9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
Rstack config consumers need to load a known
rstack.config.*file without relying on CLI-global state. This PR adds aconfigFilePathoption toloadRstackConfig, delegates relative-path resolution to@rstackjs/load-config, and preserves the existing CLI-state and default-discovery fallbacks. It covers explicit-path precedence and config-state cleanup.