mirror of
https://github.com/danielmiessler/fabric.git
synced 2026-09-10 07:36:44 -04:00
- 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.
23 lines
331 B
Go
23 lines
331 B
Go
//go:build unix
|
|
|
|
package fsdb
|
|
|
|
import (
|
|
"os"
|
|
"runtime"
|
|
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
func lockExclusive(f *os.File) error {
|
|
err := unix.Flock(int(f.Fd()), unix.LOCK_EX)
|
|
runtime.KeepAlive(f)
|
|
return err
|
|
}
|
|
|
|
func unlockExclusive(f *os.File) error {
|
|
err := unix.Flock(int(f.Fd()), unix.LOCK_UN)
|
|
runtime.KeepAlive(f)
|
|
return err
|
|
}
|