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.
27 lines
829 B
Go
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}
|
|
}
|