Replace TimeProvider with kotlin.time.Instant#32
Conversation
Eliminate the flat `internal/` and `model/` packages in favor of domain-based sub-packages that reflect actual responsibility: - `task/` — DownloadTask, TaskStore, TaskRecord, TaskState, InMemoryTaskStore - `segment/` — Segment, SegmentCalculator, SegmentDownloader - `engine/` — HttpEngine, DownloadCoordinator, RangeSupportDetector, ServerInfo - `file/` — FileAccessor, FileNameResolver, DefaultFileNameResolver, PathSerializer - `log/` — Logger, KDownLogger - root — KDown, DownloadConfig, DownloadRequest, DownloadProgress, DownloadState Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the TimeProvider wrapper and use Clock.System.now() directly. Change createdAt/updatedAt fields from Long to kotlin.time.Instant, which has built-in serialization support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code ReviewCLAUDE.md Documentation IssueThe package structure documentation in The current package structure line includes:
Since Suggested fix: Remove Reference: .claude/CLAUDE.md - Architecture Patterns |
|
@claude Fix PR reviews |
|
Claude finished @linroid's task in 59s —— View job Fixed PR Review Issues ✓Tasks:
Summary: Changes:
|
TimeProvider has been removed in this PR and replaced with kotlin.time.Instant. Co-authored-by: Lin Zhang <linroid@users.noreply.github.com>
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
Summary
TimeProviderwrapper, useClock.System.now()directlycreatedAt/updatedAtfields fromLongtokotlin.time.InstantinTaskRecordandDownloadTaskkotlin.time.Instanthas built-in@Serializablesupport, no custom serializer neededSqliteTaskStoreto convert betweenInstantand epoch millis for SQLite storageTest plan
TaskRecordTestandInMemoryTaskStoreTestpass withInstanttypes🤖 Generated with Claude Code