c41e5063b7
Removed entire kbx-foundation-v36 directory as it's been replaced by the new KBX Foundation v4 patterns implemented in this session: - Registry-driven screen definitions - Density-aware UI adapter components - Feature module templates (ShadowRun, Models) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
15 lines
497 B
C#
15 lines
497 B
C#
namespace Kbx.Shared.Runtime;
|
|
|
|
public static class KbxOperationPolicy
|
|
{
|
|
public static bool IsTerminal(string status) => status is "completed" or "partially-completed" or "failed" or "cancelled";
|
|
|
|
public static bool CanRetryTransport(string httpMethod, bool hasIdempotencyKey)
|
|
{
|
|
if (httpMethod is "GET" or "HEAD") return true;
|
|
return hasIdempotencyKey;
|
|
}
|
|
|
|
public static bool CanStartCommit(string currentStatus) => currentStatus is "validated" or "retryable";
|
|
}
|