refactor: share the create-retry loop driver between the CLI and the SDK

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
32/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust
領域
backend, cli

調査の方向性

Start by reading the shared decision layer create_retry in openshell-core, then the CLI create path and the SDK create path that currently each wrap it in their own loop (the SDK one exercised by its mock, the CLI by its integration tests). Compare the two loops for lock-timeout retry, AlreadyExists polling and budget accounting, and sketch the adapter trait that hides the proto/SdkError versus miette split. Done means one driver, both sides adapted, and the invariants (attempt cap, budget, holder provenance) tested once in the driver while existing SDK mock and CLI integration tests keep passing.

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

説明

state:triage-needed

Title: refactor: share the create-retry loop driver between the CLI and the SDK

User Story

I maintain the CLI and SDK create paths. Both implement the same retry loop (lock-timeout retry, AlreadyExists phase poll, budget accounting) on top of the shared decision layer, and I need them driven by one implementation so their behavior cannot drift.

Description

Extract the create-retry loop into a shared driver, generic over the transport and error surface, with hooks for the CLI's stderr progress and miette shaping. The decision layer in openshell-core (create_retry) is already shared; this covers the loop plumbing around it.

Context

  • Raised in the #5745 review round and deferred to keep that PR small.
  • The CLI needs raw proto requests and responses, miette reports, and stderr progress; the SDK needs SdkError and SandboxRef, so the driver needs an adapter trait rather than a shared error type.

Definition of Done

  • One driver implements the loop; the CLI and the SDK adapt it
  • The existing SDK mock and CLI integration tests keep their behavior
  • The shared invariants (attempt cap, budget, holder provenance) are tested once, in the driver
主要言語
Rust
スター
21.5k
フォーク
2.1k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

NVIDIA/OpenShell のほかの issue

NVIDIA/OpenShell の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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