Files
pages/internal/ordoschnellic/policy.go
T
Anya Tokugawa d5d21b7841
Build and publish container images / images (push) Successful in 9m34s
Release container images / release (push) Successful in 36s
Refactor architecture into eight components and consolidate reliability work
Extract Grammaratur, Dregarnuhr, Geduldh, Mestionora, Ordoschnellic, Schutzaria, Kunstzeal and Seheweit behind compatible application contracts.

Include accumulated editor resilience, navigation and theme UX, remote CLI, storage/schema and DR groundwork, tests and design/operations documentation.

Verified: uncached full Go suite; go vet ./...; race tests for all eight components; 11 targeted Chromium tests; Node suites; 19 Python CLI tests; reproducible editor build. No push, release tag or deployment in this checkpoint.
2026-11-01 15:23:31 +09:00

27 lines
829 B
Go

package ordoschnellic
import "time"
const (
PushBatchLimit = 20
PushBatchTimeout = 25 * time.Second
PushFinishTimeout = 3 * time.Second
PushLeaseDuration = time.Minute
PushFocusDelay = time.Minute
PushRetention = 24 * time.Hour
PushAttemptLimit = 5
)
// RetryAt preserves 2/4/8/16-minute backoff after attempts 1 through 4.
// Exhausted or invalid attempts are terminal and cannot overflow a shift.
func RetryAt(attempt int, now time.Time) (time.Time, bool) {
if attempt < 1 || attempt >= PushAttemptLimit {
return time.Time{}, false
}
return now.Add(time.Duration(1<<attempt) * time.Minute), true
}
func ClassifyPushStatus(status int) Outcome {
return Outcome{Success: status >= 200 && status < 300, Retry: status == 429 || status >= 500, Expired: status == 404 || status == 410, Attempted: true}
}