Repository navigation
refactor: Standardize time handling using Instant and Clock - #752
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Legacy offset-free profile timestamps are incorrectly reinterpreted as UTC, causing time shifts outside UTC.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Standardizes user-profile timestamps on kotlin.time.Instant and updates supporting persistence and tests.
Changes:
- Migrates profile timestamps and repository persistence to
Instant. - Removes obsolete time parsing and Git utilities.
- Updates tests and native-image metadata.
| File | Description |
|---|---|
UserProfile.kt |
Migrates profile timestamps to Instant. |
TimeUtil.kt |
Removes LocalDateTime parsing. |
Git.kt |
Deletes the unused Git utility. |
UserProfileRepository.kt |
Reads and writes profile timestamps as instants. |
TokenAwareSummarizingMemoryTest.kt |
Uses Kotlin Clock. |
TurnTimelineEntryAppendDedupedTest.kt |
Stabilizes tool timestamps. |
reachability-metadata.json |
Refreshes native-image metadata. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Replaces all usages of `java.time.*` and `java.util.Date` with `kotlin.time.Instant` and `kotlin.time.Clock`. - Standardizes timestamp representation across all shared models, DTOs, and domain layers. - Updates database schemas (SQLDelight) and corresponding repository adapters to utilize `kotlin.time.Instant` for persistence. - Updates utility functions and data mapping logic to ensure cross-platform time consistency.
haiphucnguyen
force-pushed
the
feature/improvements
branch
from
October 6, 2026 04:05
6a301f4 to
6805905
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
UserProfiledomain model fields (createdAt,updatedAt) fromLocalDateTimetoInstant.kotlin.time.ClockandInstantfor persistence and default values.TimeUtiland removes support for legacy space-separated date formats.kotlin.time.Clockfor accurate temporal testing.Related Issue(s)
Type of Change
What Changed & Why
How to Test
./gradlew testScreenshots / Recordings (if applicable)
Checklist
main./gradlew spotlessApplyand./gradlew detektlocally./gradlew testand all tests passgit commit -sAdditional Notes