danielmiessler.fabric/internal/plugins/db/fsdb/env_lock_windows.go
Kayvan Sylvan 9b724f8cec fix: persist refreshed Codex tokens and reactivate configured vendors
- Persist rotated Codex OAuth tokens after every successful refresh.
- Reload stored credentials under cross-process locks before refreshing.
- Write environment updates atomically with secret-only file permissions.
- Preserve existing environment values while skipping empty replacements.
- Activate configured vendors lazily and surface configuration failures immediately.
- Reuse valid refresh tokens before starting interactive authentication.
- Localize Codex setup, provider, request, and persistence errors.
- Upgrade AI, cloud, telemetry, and supporting Go dependencies.
- Set Claude Opus 5 as default changelog summarizer.
- Document `.env` token sensitivity and rewrite behavior.
2026-08-27 18:12:08 -07:00

20 lines
417 B
Go

//go:build windows
package fsdb
import (
"os"
"golang.org/x/sys/windows"
)
func lockExclusive(f *os.File) error {
var overlapped windows.Overlapped
return windows.LockFileEx(windows.Handle(f.Fd()), windows.LOCKFILE_EXCLUSIVE_LOCK, 0, 1, 0, &overlapped)
}
func unlockExclusive(f *os.File) error {
var overlapped windows.Overlapped
return windows.UnlockFileEx(windows.Handle(f.Fd()), 0, 1, 0, &overlapped)
}