Pulse/internal/config
rcourtman 431769024f Fix P1: Config Persistence transaction field synchronization
**Problem**: writeConfigFileLocked() accessed c.tx field without synchronization
- Function reads c.tx to check if transaction is active (line 109)
- c.tx modified by begin/endTransaction under lock, but read without lock
- Race condition: c.tx could change between check and use

**Impact**:
- Inconsistent transaction handling
- File could be written directly when it should be staged
- Or staged when it should be written directly
- Data corruption risk during config imports

**Fix** (lines 108-128):
- Added documentation that caller MUST hold c.mu lock
- Read c.tx into local variable tx while lock is held
- Use local copy for transaction check
- Safe because all callers hold c.mu when calling writeConfigFileLocked
- Transaction field only modified while holding c.mu in begin/endTransaction

This maintains the existing contract (callers hold lock) while making the transaction read safe and explicit.
2025-11-07 10:00:31 +00:00
..
api_tokens.go feat: add native Windows service support and expandable host details 2025-10-23 22:11:56 +00:00
api_tokens_test.go Add API token scopes and standalone host agent 2025-10-23 11:40:31 +00:00
client_helpers.go Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
config.go Add configurable SSH port for temperature monitoring 2025-11-05 20:03:29 +00:00
credentials.go Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
docker_metadata.go Implement Docker metadata API endpoints 2025-10-28 22:56:53 +00:00
export.go feat: production-ready import/export with API tokens and transactional rollback 2025-10-21 14:37:44 +00:00
guest_metadata.go Fix VM migration issue where custom alert thresholds are lost 2025-11-06 10:27:15 +00:00
import_transaction.go feat: production-ready import/export with API tokens and transactional rollback 2025-10-21 14:37:44 +00:00
oidc.go Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
persistence.go Fix P1: Config Persistence transaction field synchronization 2025-11-07 10:00:31 +00:00
persistence_fail_test.go Harden setup token flow and enforce encrypted persistence 2025-10-25 16:00:37 +00:00
persistence_test.go Add API token scopes and standalone host agent 2025-10-23 11:40:31 +00:00
registration.go Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
watcher.go Fix P1/P2 infrastructure issues: panic recovery and optimizations 2025-11-07 09:55:22 +00:00