Skip to content

fix(cli): isolate concurrent credential temp files - #978

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
WNZhao:fix/credentials-concurrent-writes
Aug 28, 2026
Merged

fix(cli): isolate concurrent credential temp files#978
ralyodio merged 1 commit into
profullstack:masterfrom
WNZhao:fix/credentials-concurrent-writes

Conversation

@WNZhao

@WNZhao WNZhao commented Aug 24, 2026

Copy link
Copy Markdown

Summary

  • give every credential write a unique temporary path
  • clean up the temporary file when an atomic write fails
  • add a regression test covering 20 concurrent writes

Bug

writeCredentials previously reused credentials.json.tmp. Concurrent login/session writers raced on that file: one rename succeeded while the rest failed with ENOENT. In a local reproduction, 19 of 20 writes failed.

Verification

  • pnpm exec vitest run packages/cli/src/credentials.test.ts (3 tests passed)
  • concurrent reproduction after the patch: 20 fulfilled, 0 rejected

pnpm --filter @profullstack/sh1pt typecheck remains blocked by pre-existing unresolved workspace-package build outputs (for example @profullstack/sh1pt-core); the focused test passes.

@ralyodio
ralyodio merged commit e128d02 into profullstack:master Aug 28, 2026
6 checks passed
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.

2 participants