config.json Save() should use atomic write pattern
Open
area/environment
enhancement
- Dominant language
- Go
- Stars
- 569
- Forks
- 364
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 136
Description
## Context
`config.json` writes use direct `os.WriteFile` which can produce torn reads if the process is interrupted mid-write. The environment package already has `WriteFileAtomic` (write-to-temp + rename) for `.env` files.
## Proposal
Apply the same atomic write pattern to `config.json` saves. Depends on #WriteFileAtomic being available in a shared location (see companion issue for hoisting to pkg/osutil).
## References
- PR #7776 follow-up from concurrency review
Contributor guide
Assessment
This issue has not been assessed yet.