Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Concurrent MCP OAuth token saves can lose credentials

オープン
#146 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
node.js, typescript

調査の方向性

The issue is in packages/coding-agent/src/step/mcp-oauth.ts. Look at the saveTokens method and the publish function. The repo already uses proper-lockfile for auth.json; examine how that lock is implemented. You'll need to apply a similar cross-process lock around the read-modify-write sequence for .credentials.json. Create a unique temporary file for the write before the atomic rename. Test by simulating concurrent OAuth token saves from two Step processes.

索引モデルが issue の本文から書いたものです。

説明

untriaged
What happened?

MCP OAuth token updates use an unlocked read-modify-write of .credentials.json. Both createStoredMcpOAuthProvider().saveTokens() and loginMcpServer().saveTokens() load the whole store, change one server entry, then rename a replacement file. Two Step processes saving different servers can both read the same old store; the second rename drops the first process's new token.

Steps to reproduce

Use one config root with two MCP servers and run two Step processes. Trigger both OAuth token saves concurrently. If both processes read the store before either rename, the final file contains only the update from the last writer. The relevant read/update and publish paths are synchronous but unguarded across processes.

Expected behavior

Lock the credential store across processes around reload, update, and publish, then release in finally. This repo already uses proper-lockfile for auth.json; its documented lock API supports retries and realpath: false for a missing target. The MCP SDK awaits saveTokens, so the provider can use an async lock. Use a unique temporary path for publication.

Version

main @ cb5fc1456d49d49c62e072bfed2926220083214e

AI-assisted report; source path checked against the stated commit.

主要言語
TypeScript
スター
850
フォーク
62
平均マージ
1日 12時間
マージ済み PR(30日)
43

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

stepfun-ai/Step-Code のほかの issue

stepfun-ai/Step-Code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。