Skip to content

refactor: use getSpawnCloudConfigPath(), remove dead _cloudName param#3012

Merged
louisgv merged 1 commit intomainfrom
fix/issue-3010
Mar 26, 2026
Merged

refactor: use getSpawnCloudConfigPath(), remove dead _cloudName param#3012
louisgv merged 1 commit intomainfrom
fix/issue-3010

Conversation

@la14-1
Copy link
Copy Markdown
Member

@la14-1 la14-1 commented Mar 26, 2026

Why: Prevents silent path breakage if spawn config dir moves; removes dead parameter

Summary

  • Replace hand-constructed ~/.config/spawn/openrouter.json path in delegateCloudCredentials() with getSpawnCloudConfigPath("openrouter") from paths.ts (single source of truth)
  • Remove unused _cloudName parameter from delegateCloudCredentials() — the function delegates ALL cloud credentials unconditionally regardless of which cloud is active
  • Remove now-unused getUserHome import from orchestrate.ts
  • Update 4 call sites in recursive-spawn.test.ts
  • Bump CLI version to 0.26.11

Fixes #3010

Test plan

  • All 1947 tests pass (0 failures)
  • Biome lint clean (0 errors)
  • Verified delegateCloudCredentials test coverage still exercises all branches (skip, delegate, write-fail, mkdir-fail)

-- refactor/ux-engineer

…#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>
Copy link
Copy Markdown
Member

@louisgv louisgv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security Review

Verdict: APPROVED
Commit: a57a91b

Findings

None. Clean refactor.

Analysis

  • Removes unused _cloudName parameter from delegateCloudCredentials()
  • 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

@louisgv louisgv merged commit 405dbc6 into main Mar 26, 2026
6 checks passed
@louisgv louisgv deleted the fix/issue-3010 branch March 26, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: use getSpawnCloudConfigPath() in delegateCloudCredentials, remove dead _cloudName param

2 participants