Skip to content

fix: standard site sync - #2994

Merged
trueberryless merged 1 commit into
mainfrom
w/ss-fixes
Jul 4, 2026
Merged

fix: standard site sync#2994
trueberryless merged 1 commit into
mainfrom
w/ss-fixes

Conversation

@ghostdevv

Copy link
Copy Markdown
Member

Looks like after #1879 (probably) when the blog post avatars were done at build time, the schema that was being used in the standard site sync code for the blog post frontmatter validation wasn't updated, so it's been failing to sync. I ran this fix so the standard site is working in production, and this should keep it working for future posts.

@vercel

vercelBot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
npmx.devReadyReadyPreview, CommentJul 4, 2026 2:42am
2 Skipped Deployments
ProjectDeploymentActionsUpdated (UTC)
docs.npmx.devIgnoredIgnoredPreviewJul 4, 2026 2:42am
npmx-lunariaIgnoredIgnoredJul 4, 2026 2:42am

Request Review

@coderabbitai

coderabbitaiBot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b11bc4c2-c63a-4213-95e3-6ddb7ec6274c

📥 Commits

Reviewing files that changed from the base of the PR and between 2e8fb1d and 09203ba.

📒 Files selected for processing (2)
  • modules/standard-site-sync.ts
  • shared/schemas/blog.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • modules/standard-site-sync.ts

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Blog synchronisation now validates incoming post data more strictly, helping prevent invalid frontmatter from being processed.
    • New posts and publications now use a more reliable short delay before indexing, improving sync consistency.
  • Refactor
    • Simplified how blog documents are built during synchronisation, with no change to the visible content.

Walkthrough

This change updates blog frontmatter validation to use RawBlogPostSchema, removes siteUrl from buildATProtoDocument, and switches the post-publication delay to node:timers/promisessetTimeout. BlogPostSchema is also no longer exported.

Changes

Standard Site Sync Updates

Layer / File(s)Summary
Schema validation update
shared/schemas/blog.ts, modules/standard-site-sync.ts
Frontmatter validation now uses RawBlogPostSchema for safeParse, and BlogPostSchema is no longer exported from the shared schema module.
buildATProtoDocument signature simplification
modules/standard-site-sync.ts
buildATProtoDocument no longer takes a siteUrl parameter; the call site now passes only the validated blog data.
Publication delay mechanism change
modules/standard-site-sync.ts
The post-publication wait now imports setTimeout from node:timers/promises and uses await setTimeout(2_000).
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check nameStatusExplanation
Title check✅ PassedThe title clearly matches the main change: fixing standard site sync after the frontmatter schema update.
Description check✅ PassedThe description directly explains the sync failure and the schema mismatch that this PR fixes.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch w/ss-fixes

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.

@codecov

codecovBot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@ghostdevvghostdevv changed the title chore(fix): standard site syncfix: standard site syncJul 4, 2026
@ghostdevv

Copy link
Copy Markdown
MemberAuthor

thanks to Francisco for noticing: https://bsky.app/profile/frabarz.cl/post/3mpquscaios24

}

const result = safeParse(BlogPostSchema, normalizedFrontmatter)
const result = safeParse(RawBlogPostSchema, normalizedFrontmatter)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

(this is the only fix, the other changes are because I can't help myself but tidy up a tiny bit)

@trueberrylesstrueberryless left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me 🚀

Thanks for the quick fix!

@trueberryless
trueberryless added this pull request to the merge queueJul 4, 2026
Merged via the queue into main with commit e731a54Jul 4, 2026
27 checks passed
@trueberryless
trueberryless deleted the w/ss-fixes branch July 4, 2026 06:36
@github-actionsgithub-actionsBot mentioned this pull request Jul 4, 2026
ayo-run pushed a commit to ayo-run/npmx.dev that referenced this pull request Aug 5, 2026
Sign up for freeto 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.

2 participants

@ghostdevv@trueberryless