fix(config): drop meaningless DefaultSettings UpdatedAt timestamps - #1056
Conversation
…ero time
Static default settings are never "updated" by a user; stamping UpdatedAt
with time.Now() at init was misleading and could produce false-positive
"recently changed" signals. Replace with time.Time{} (zero value) to clearly
distinguish compile-time defaults from DB-persisted user updates.
Update TestDefaultSettings_UpdatedAtSet to assert the zero value instead of
asserting non-zero, and remove the now-unused "time" import.
Closes #1051
|
Warning Review limit reached
More reviews will be available in 17 minutes and 32 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Changes summaryfix(config): drop meaningless DefaultSettings UpdatedAt timestamps (finding 04-N2)
04-M1 disposition: confirmed subsumed by #1040 -- @coderabbitai review |
|
🧠 Learnings used✅ Action performedReview finished.
|
Summary
Static
DefaultSettingsentries ininternal/config/defaults.gostampedUpdatedAt: time.Now()at package init -- a meaningless timestamp that couldproduce false-positive "recently changed" signals versus DB-persisted user
settings.
time.Now()calls withtime.Time{}(zero value).TestDefaultSettings_UpdatedAtSettoTestDefaultSettings_UpdatedAtIsZero, asserting zero value instead."time"import fromdefaults_test.go.Closes #1051
Note on 04-M1 overlap with #1040
Finding 04-M1 (warn on malformed env int/float values) is already addressed
by PR #1040 (
fix/server-transport-config):getEnvInt,getEnvFloat, andgetTaskTimeoutall logWARNING:on parse failure in that branch. This PRcovers only the residual 04-N2 item (see
docs/code-review/open-questions/new-config-warn.md).Verification