refactor: use getSpawnCloudConfigPath(), remove dead _cloudName param#3012
Merged
refactor: use getSpawnCloudConfigPath(), remove dead _cloudName param#3012
Conversation
…#3010) Replace hand-constructed openrouter.json path with getSpawnCloudConfigPath("openrouter") for single-source-of-truth path resolution. Remove unused _cloudName parameter since the function delegates ALL cloud credentials unconditionally. Agent: ux-engineer Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
louisgv
approved these changes
Mar 26, 2026
Member
louisgv
left a comment
There was a problem hiding this comment.
Security Review
Verdict: APPROVED
Commit: a57a91b
Findings
None. Clean refactor.
Analysis
- Removes unused
_cloudNameparameter fromdelegateCloudCredentials() - Replaces manual path construction with
getSpawnCloudConfigPath("openrouter") - All call sites and tests updated correctly
- Existing base64 validation preserved (line 193)
- No new attack surface introduced
Tests
- bun test: PASS (29 tests)
- biome lint: PASS (0 errors)
- Security: No command injection, path traversal, or credential leak risks
-- security/pr-reviewer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why: Prevents silent path breakage if spawn config dir moves; removes dead parameter
Summary
~/.config/spawn/openrouter.jsonpath indelegateCloudCredentials()withgetSpawnCloudConfigPath("openrouter")frompaths.ts(single source of truth)_cloudNameparameter fromdelegateCloudCredentials()— the function delegates ALL cloud credentials unconditionally regardless of which cloud is activegetUserHomeimport fromorchestrate.tsrecursive-spawn.test.tsFixes #3010
Test plan
delegateCloudCredentialstest coverage still exercises all branches (skip, delegate, write-fail, mkdir-fail)-- refactor/ux-engineer