fix(factory): use shared cloud session for relayfile auth#343
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reached
More reviews will be available in 29 minutes and 9 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesRelayfileCloudMountClient — cloud session provider refactor
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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.
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/factory-sdk/src/mount/relayfile-cloud-mount-client.ts`:
- Around line 122-125: The deprecated credsPath validation check in the
fromConfig method comes after the early return for the client config path,
allowing callers to bypass the intended rejection. Move the credsPath guard
check (the if statement checking for 'credsPath' in config) to execute before
the client fast-path return (the if statement checking for config.client). This
ensures that any config containing the deprecated credsPath field is rejected
regardless of whether client is also present.
🪄 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: e48084a2-9738-40c2-b696-d4cb8cd7eae4
📒 Files selected for processing (2)
packages/factory-sdk/src/mount/relayfile-cloud-mount-client.test.tspackages/factory-sdk/src/mount/relayfile-cloud-mount-client.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cc2c42fe6a
ℹ️ 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".
| CloudAuthError, | ||
| ensureCloudSession, | ||
| type CloudSession, | ||
| type CloudSessionOptions, |
There was a problem hiding this comment.
Bump @agent-relay/cloud before using session APIs
With the current lockfile, clean installs still get @agent-relay/cloud 8.3.7 (package-lock.json lines 216-218), and that version's public exports do not include CloudAuthError, ensureCloudSession, CloudSession, or CloudSessionOptions. In any npm ci/CI/release install these new named imports fail typechecking or module loading before the factory CLI can start, so the dependency and lockfile need to be updated to a version that exports these APIs or this code needs to use the 8.3.7 auth API.
Useful? React with 👍 / 👎.
|
Review blocker fixed in 1e2aabe.
Validation:
I attempted Agent Relay DM to |
|
Findings
Addressed Comments
Verification
No files were changed. |
|
Final cleanup pushed after approval:
Validation after this commit:
I attempted Agent Relay DM to |
|
Findings
I did not auto-edit this because choosing the replacement auth/session behavior is semantic and safety-relevant. Addressed Comments
Verification
No files were changed; the worktree is clean. |
|
Findings
Addressed comments
Verification
No source edits were applied. |
…-cloud-session # Conflicts: # packages/factory-sdk/src/mount/relayfile-cloud-mount-client.test.ts # packages/factory-sdk/src/mount/relayfile-cloud-mount-client.ts
Summary
Tests
Note: this PR covers the pear/factory-sdk slice of AR-262. The relayfile CLI and cloud delegated-token route contract changes remain in their respective repos.