chore: raise runcycles dependency floor to >=0.5.0 - #11
Merged
Conversation
runcycles 0.5.0 ships durable commit retries: an on-disk journal with replay, a POST /v1/events fallback for commits that land after reservation expiry, and 429/auth commit handling that never releases spent budget (runcycles/cycles-client-python#89). Floor bump only — no guard code changes. The guard calls commit_reservation directly, so the documented commit-uncertainty exception contract (AP2GuardCommitUncertain / AP2GuardCommitFailed) is unchanged. Adopting the SDK's commit retry engine is a candidate follow-up; it would shift transient commit failures from "uncertain, caller reconciles" to "journaled, will settle" and needs its own reviewed change to the exception mapping and docs. Verified against runcycles==0.5.0: 148 tests passed (5 integration tests skipped without a live server), 99.21% coverage (gate 95%).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Raises the
runcyclesdependency floor inpyproject.tomlfrom>=0.4.1to>=0.5.0.Why
runcycles 0.5.0 (live on PyPI) ships durable commit retries (runcycles/cycles-client-python#89):
POST /v1/eventsfallback for commits that land after reservation expiry,Scope
Floor bump only — no guard code changes.
GuardedPayment/AsyncGuardedPaymentcallclient.commit_reservation(...)directly (syncguard.py_handle_commit, async sibling), and the SDK's new retry engine engages via its lifecycle/streaming layers, so this package's documented commit-uncertainty doctrine is untouched: transport/5xx/terminal-status commit outcomes still raiseAP2GuardCommitUncertain(no auto-release), unrecognized 4xx still releases and raisesAP2GuardCommitFailed.Recommended follow-up (not in this PR): evaluate adopting
CommitRetryEngine/AsyncCommitRetryEnginefor the guard's two commit sites, mirroringruncycles.lifecycle._handle_commitclassification (429 with Retry-After passthrough; 401/403 journal-never-release; 410/RESERVATION_EXPIREDto the/v1/eventsfallback; codeless 4xx journaled). This is deliberately not bundled here: for a payments guard it changes the meaning of the exception contract — transient failures would become "journaled, will settle in the background" rather than "uncertain, caller MUST reconcile" — so theAP2GuardCommitUncertainmapping and its docs need an honest redesign in a dedicated PR.Verification
pytest --cov=runcycles_ap2againstruncycles==0.5.0: 148 passed, 5 skipped (live-server integration tests, skipped by design withoutCYCLES_BASE_URL), 99.21% coverage (gatefail_under = 95).AUDIT.mdandCHANGELOG.mdupdated.