Files
CLIProxyAPI/test/codex_power_darwin_test.go
Luis Pater 1f5bf2a569 fix(codex): release refresh claims on pre-send errors and defer macOS wakes
- Classify request creation and pre-handoff connection failures separately from ambiguous post-connection errors so unsubmitted refresh grants release their journal claim and remain retryable.
- Implement owner-bound, single-attempt claim release across memory, file, PostgreSQL, Git, and S3 refresh journals while preserving replay protection for completed or uncertain exchanges.
- Apply macOS power-state readiness deferral to ordinary Codex refreshes and preserve a positive reschedule backoff in the auto-refresh manager.

Closes: #7450
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
2026-11-11 17:49:05 +08:00

19 lines
369 B
Go

//go:build darwin
package test
import (
"context"
"os"
"testing"
"github.com/router-for-me/CLIProxyAPI/v8/internal/auth/codex"
)
func TestMain(m *testing.M) {
codex.ReadSIWCSystemState = func(context.Context) ([]byte, error) {
return []byte("Current System Capabilities are: CPU Graphics Audio Network\nCurrent Power State: 4\n"), nil
}
os.Exit(m.Run())
}