You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor: share the create-retry loop driver between the CLI and the SDK #5900
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.
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
Activity