fix(SUP-1496): align gbrain vault path resolution#19
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR integrates the shared jarvos-paths resolver into gbrain configuration, updates vault/notes defaults to "Vault v3", adds optional loader/helpers and resolveConfig fallbacks, extends doctor() to validate paths, updates tests, and declares an optional peerDependency for ChangesjarvOS Path Resolution Integration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a79a7c3c0
ℹ️ 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".
| const JARVOS_PATHS_MODULE = path.resolve( | ||
| MODULE_ROOT, | ||
| '..', | ||
| 'jarvos-secondbrain', | ||
| 'bridge', | ||
| 'config', | ||
| 'jarvos-paths.js', |
There was a problem hiding this comment.
Use an installable resolver path for shared config
When @jarvos/gbrain is used as an installed package rather than run from this monorepo source layout, this hard-coded sibling path points at node_modules/@jarvos/jarvos-secondbrain/..., which does not exist, so loadJarvosPaths() silently falls back and ignores jarvos.config.json/JARVOS_CLAWD_DIR. In that documented package/API usage, callers relying on the shared jarvOS resolver will import from the fallback ~/Documents/Vault v3 instead of the configured vault; the resolver needs to be loaded through an installable dependency/export or otherwise locate the shared config outside the source-tree-only sibling path.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9021432d6d
ℹ️ 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".
| const notes = path.join(vault, 'Installed Notes'); | ||
|
|
||
| try { | ||
| fs.rmSync(packageRoot, { recursive: true, force: true }); |
There was a problem hiding this comment.
Avoid deleting the real peer dependency during tests
When this test runs in a checkout where modules/jarvos-gbrain/node_modules/@jarvos/secondbrain is an actual installed peer/workspace link, this setup removes it before writing the fake fixture and removes it again in finally, leaving the developer/CI install mutated after npm test --prefix modules/jarvos-gbrain. Use a temporary project directory or isolated NODE_PATH/cwd for the fake package instead of writing into the package's real node_modules.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
modules/jarvos-gbrain/package.json (1)
25-27: ⚡ Quick winUse a semver-compatible peer range instead of exact version pin for
@jarvos/secondbrain.The exact pin to
"0.1.0"can create unnecessary friction when compatible patch or minor versions are released. Since the peer dependency is optional, using^0.1.0allows flexibility for compatible updates while maintaining safety in the early 0.x stage.Proposed change
"peerDependencies": { - "@jarvos/secondbrain": "0.1.0" + "@jarvos/secondbrain": "^0.1.0" },🤖 Prompt for 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. In `@modules/jarvos-gbrain/package.json` around lines 25 - 27, Update the peer dependency declaration for `@jarvos/secondbrain` in package.json to use a semver-compatible range rather than an exact pin: replace the exact version "0.1.0" under the "peerDependencies" key with a caret range like "^0.1.0" so compatible patch/minor updates are allowed while still constraining 0.x compatibility.
🤖 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.
Nitpick comments:
In `@modules/jarvos-gbrain/package.json`:
- Around line 25-27: Update the peer dependency declaration for
`@jarvos/secondbrain` in package.json to use a semver-compatible range rather than
an exact pin: replace the exact version "0.1.0" under the "peerDependencies" key
with a caret range like "^0.1.0" so compatible patch/minor updates are allowed
while still constraining 0.x compatibility.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0971c297-d1e9-4498-bb3f-61b642e02038
📒 Files selected for processing (3)
modules/jarvos-gbrain/package.jsonmodules/jarvos-gbrain/src/index.jsmodules/jarvos-gbrain/test/gbrain.test.js
🚧 Files skipped from review as they are similar to previous changes (2)
- modules/jarvos-gbrain/test/gbrain.test.js
- modules/jarvos-gbrain/src/index.js
Summary
@jarvos/gbrainwith the shared jarVOS vault path resolver from@jarvos/secondbrainjarvos-gbrain doctorWhy
SUP-1496 is the first execution slice under SUP-1425. The GBrain bridge was still defaulting to
~/Documents/ObsidianVault, while Andrew's configured jarVOS vault lives under~/Vaults/Vault v3. Before importing curated memory, the module needs to use the same canonical vault resolver as the rest of jarVOS.Validation
node --check modules/jarvos-gbrain/src/index.js && node --check modules/jarvos-gbrain/scripts/jarvos-gbrain.jsnode --test modules/jarvos-gbrain/test/*.test.jsnpm test --prefix modules/jarvos-gbrainnode modules/jarvos-gbrain/scripts/jarvos-gbrain.js doctornode tests/modules-smoke-test.jsbash scripts/smoke-test.shnpm testnpm test --prefix modules/jarvos-secondbraingit diff --checkParent: SUP-1425
Child: SUP-1496
Summary by CodeRabbit
New Features
Documentation
Bug Fixes
Tests
Chores