Skip to content

cleanup(data): fix epoch ISO formatter KDoc - #1325

Merged
9thLevelSoftware merged 1 commit into
mainfrom
cursor/epoch-iso-formatter-kdoc-1020
Oct 23, 2026
Merged

9thLevelSoftware merged 1 commit into
mainfrom
cursor/epoch-iso-formatter-kdoc-1020

Conversation

@9thLevelSoftware

Copy link
Copy Markdown
Owner

Summary

epochToIso8601 still documented a manual kotlinx-datetime conversion. After #1315 the function formats epoch milliseconds with kotlin.time.Instant.toString().

The KDoc now matches that output: a UTC ISO-8601 instant that always ends in Z. Whole seconds omit the fraction (2023-11-14T22:13:20Z); any other millisecond keeps exactly three fractional digits, including trailing zeros (2023-11-14T22:13:20.100Z).

The matching test comment in PortalSyncAdapterTest.kt already names kotlin.time.Instant.toString() and the 2023-11-14T22:13:20Z example, so it was left unchanged. No behavior change.

Verify

./gradlew :shared:compileKotlinIosSimulatorArm64 -Pskip.supabase.check=true :shared:compileAndroidHostTest :androidApp:compileDebugKotlin

BUILD SUCCESSFUL

Open in Web Open in Cursor 

epochToIso8601 formats milliseconds with kotlin.time.Instant.toString():
a UTC ISO-8601 instant ending in Z, with the fraction omitted on whole
seconds and exactly three digits otherwise. The old KDoc still described
a manual kotlinx-datetime formatter.

Co-authored-by: Devil <9thLevelSoftware@users.noreply.github.com>
@9thLevelSoftware
9thLevelSoftware marked this pull request as ready for review October 23, 2026 14:31
Copilot AI balanced review requested due to automatic review settings October 23, 2026 14:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kilo-code-bot

kilo-code-bot Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 2 Issues Found | Recommendation: Merge (suggestions only)

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 2
Issue Details (click to expand)

SUGGESTION

File Line Issue
shared/src/commonMain/kotlin/com/devil/phoenixproject/data/sync/PortalSyncAdapter.kt 1021 Documented fractional format (2023-11-14T22:13:20.100Z) is not asserted by any test — add a non-whole-second case
shared/src/commonMain/kotlin/com/devil/phoenixproject/data/sync/PortalSyncAdapter.kt 1024 Ponytail shrink: helper body can be a single expression body
Files Reviewed (1 file)
  • shared/src/commonMain/kotlin/com/devil/phoenixproject/data/sync/PortalSyncAdapter.kt - 2 issues

Verdict

Approve — doc-only change; the new KDoc matches kotlin.time.Instant.toString() output and no behavior changed.

Correctness / Safety Findings

No correctness or safety findings.

Ponytail Review

shared/src/commonMain/kotlin/com/devil/phoenixproject/data/sync/PortalSyncAdapter.kt:L1024: shrink — three-line body with an intermediate val. Use an expression body (= kotlin.time.Instant.fromEpochMilliseconds(epochMs).toString()), matching domainLastEditEpochMs at L1033.

Ponytail net: -1 lines.

Suggested Minimal Patch

Optional, at most 2 files: (1) collapse epochToIso8601 to an expression body in PortalSyncAdapter.kt; (2) add one assertion in PortalSyncAdapterTest.kt for epoch 1700000000100L → 2023-11-14T22:13:20.100Z. No new dependencies, no refactor.

Final Merge Guidance

Can merge as-is; both findings are optional cleanup.

Note: no code was executed in this review. The whole-second output (2023-11-14T22:13:20Z) is confirmed by existing assertions in PortalSyncAdapterTest.kt; the fractional-digit claim was checked against kotlin.time.Instant/kotlinx-datetime ISO conventions only, which is why the test suggestion is raised.

Fix these issues in Kilo Cloud


Reviewed by minimax-m3 · Input: 60K · Output: 26.8K · Cached: 632.5K

Review guidance: REVIEW.md from base branch main

@9thLevelSoftware
9thLevelSoftware merged commit 5144220 into main Oct 23, 2026
11 checks passed
@9thLevelSoftware
9thLevelSoftware deleted the cursor/epoch-iso-formatter-kdoc-1020 branch October 23, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants