Skip to content

Conversation

@yangxiaolang
Copy link
Collaborator

@yangxiaolang yangxiaolang commented Jan 19, 2026

Summary by CodeRabbit

  • Chores

    • Build configuration updated to include explicit git fetch options (depth/retries/timeout).
  • New Features

    • Posts now expose a numeric last-updated timestamp and are sorted by that timestamp for more accurate ordering.
    • Last-updated timestamp surfaced in post metadata.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 19, 2026

Walkthrough

Added a git: options: block to .build/build.yaml; extended post resolver types and logic by introducing lastUpdatedTimestamp (numeric) into PostInfo, using it for sorting and exposing it in returned payloads.

Changes

Cohort / File(s) Change Summary
Build configuration
/.build/build.yaml
Inserted a git: options: block with depth: 0, retries: 0, timeout: 0m; minor YAML formatting change (script block style adjusted).
Post resolver — implementation
plugins/plugin-post-resolver/PostData.ts
Added lastUpdatedTimestamp (fallback to Date.now()), replaced usage of lastUpdated with lastUpdatedTimestamp for lastUpdatedTime, included lastUpdatedTimestamp in returned PostInfo, and updated sortPostInfos to sort by lastUpdatedTimestamp.
Post resolver — types
plugins/plugin-post-resolver/types.ts
Extended exported PostInfo interface to include new lastUpdatedTimestamp: number field.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I nibble timestamps, fresh and bright,
I tuck a number in each post's light,
I hop through YAML, tidy and neat,
A tiny change — the sort's heartbeat. 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title describes fixing a production build update time error, which aligns with the changes that address lastUpdatedTimestamp handling in post data.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @.build/build.yaml:
- Around line 98-99: Replace the blind "git fetch --unshallow || true" with a
conditional that first checks shallow status (e.g., using "git rev-parse
--is-shallow-repository") and only attempts "git fetch --unshallow" when needed;
capture the fetch exit code and emit a warning log if the fetch fails so the
pipeline logs clearly indicate the last-modified-time fix may not apply.
Specifically, locate the step containing the literal "git fetch --unshallow ||
true" and change it to: detect shallow repo, run "git fetch --unshallow" if
shallow, and on non-zero exit emit a warning message clarifying the fetch failed
and that file last-modified timestamps may be inaccurate.
- Around line 83-90: The extraction of host and path from git remote URLs fails
for scp-style remotes (e.g., git@github.com:org/repo.git); update the logic that
sets host and path (the host=... and path=... assignments used before invoking
/katanomi/bin/ktn-task copy git) to detect whether the remote URL contains "://"
and use the existing sed rules for HTTP/HTTPS, otherwise handle scp-style by
stripping the optional user@ prefix, replacing the ':' separator with '/',
removing any ".git" suffix and any "@..." ref suffix, and then set host to the
hostname portion and path to the repo path (so ktn-task copy git
--server=${host} --scope-prefix=${path} receives correct values).

@yangxiaolang yangxiaolang force-pushed the fix/prod-build-update-time-error branch from ee407a6 to b128db9 Compare January 19, 2026 07:32
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