File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -312,8 +312,8 @@ Control what happens when actual usage exceeds the estimate at commit time:
312312` ` ` python
313313from runcycles import CommitOveragePolicy
314314
315- # REJECT (default) — commit fails if budget is insufficient for the overage
316- # ALLOW_IF_AVAILABLE — commit succeeds if remaining budget covers the overage
315+ # REJECT — commit fails if budget is insufficient for the overage
316+ # ALLOW_IF_AVAILABLE (default) — commit succeeds if remaining budget covers the overage
317317# ALLOW_WITH_OVERDRAFT — commit always succeeds, may create debt
318318
319319@cycles(estimate=1000, overage_policy=" ALLOW_WITH_OVERDRAFT" , client=client)
Original file line number Diff line number Diff line change 88DEFAULT_READ_TIMEOUT = 5.0
99DEFAULT_TTL_MS = 60_000
1010DEFAULT_GRACE_PERIOD_MS = 5_000
11- DEFAULT_OVERAGE_POLICY = "REJECT "
11+ DEFAULT_OVERAGE_POLICY = "ALLOW_IF_AVAILABLE "
1212DEFAULT_UNIT = "USD_MICROCENTS"
1313
1414RESERVATIONS_PATH = "/v1/reservations"
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ def cycles(
6262 unit : Unit | str = Unit .USD_MICROCENTS ,
6363 ttl_ms : int = 60_000 ,
6464 grace_period_ms : int | None = None ,
65- overage_policy : str = "REJECT " ,
65+ overage_policy : str = "ALLOW_IF_AVAILABLE " ,
6666 dry_run : bool = False ,
6767 tenant : str | None = None ,
6868 workspace : str | None = None ,
@@ -87,7 +87,7 @@ def cycles(
8787 unit: Cost unit. Default: USD_MICROCENTS.
8888 ttl_ms: Reservation TTL in milliseconds. Default: 60000.
8989 grace_period_ms: Grace period after TTL expiry in milliseconds.
90- overage_policy: REJECT, ALLOW_IF_AVAILABLE, or ALLOW_WITH_OVERDRAFT.
90+ overage_policy: REJECT, ALLOW_IF_AVAILABLE (default) , or ALLOW_WITH_OVERDRAFT.
9191 dry_run: If True, evaluate without persisting (method won't execute).
9292 tenant: Subject tenant override.
9393 workspace: Subject workspace override.
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class DecoratorConfig:
5353 unit : str = "USD_MICROCENTS"
5454 ttl_ms : int = 60_000
5555 grace_period_ms : int | None = None
56- overage_policy : str = "REJECT "
56+ overage_policy : str = "ALLOW_IF_AVAILABLE "
5757 dry_run : bool = False
5858 tenant : str | None = None
5959 workspace : str | None = None
You can’t perform that action at this time.
0 commit comments