Skip to content

Optimize news costs, translation latency, and crawl budget - #87

Merged
svg8bit merged 1 commit into
mainfrom
codex/news-cheap-model
Sep 19, 2026
Merged

svg8bit merged 1 commit into
mainfrom
codex/news-cheap-model

Conversation

@svg8bit

@svg8bit svg8bit commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • use lower-cost gpt-5.6-luna, keeping medium reasoning only for research and low reasoning for translation/social selection
  • move local translation to a non-blocking two-CPU worker; notify IndexNow/WebSub immediately for English and again after localized exports
  • prioritize complete fresh-article translations before archive/map dictionary work and double local inference batch size without changing beam quality
  • submit one primary English <loc> per page with complete localized hreflang alternates, cutting the crawl inventory by roughly one order of magnitude while retaining multilingual discovery

Verification

  • npm run check
  • npm run test:e2e (144 passed)
  • targeted news tests (19 passed)
  • translation priority assertion with production translation environment
  • current production catalog: 200 primary URLs per article sitemap part with 1,960 hreflang alternates; core sitemap 186 primary URLs

@vercel

vercel Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
oddsfront Ready Ready Preview Sep 19, 2026 9:36am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 19, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: aa3fe4d1-eab8-4e17-8c0a-c943098d169f


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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-19T09:43:19.354405Z 5e4c8ee PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@svg8bit
svg8bit enabled auto-merge (squash) September 19, 2026 09:37
@svg8bit
svg8bit merged commit cdc3c5c into main Sep 19, 2026
6 checks passed
@svg8bit
svg8bit deleted the codex/news-cheap-model branch September 19, 2026 09:40

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5e4c8eef12

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/news/translate.py
Comment on lines +47 to +48
if article_pending:
return sorted(article_pending)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Schedule the deferred dictionary translation pass

When regular editions continue publishing, every worker invocation begins with missing article text, so this early return discards the remaining text budget and dictionary_pending is never reached. Because the worker is only queued after a new edition, live market labels and explanatory-page strings can remain untranslated indefinitely even when the fresh articles consume far less than the 150-text budget; run a second pass after exporting the article translations or explicitly schedule the deferred backlog work.

Useful? React with 👍 / 👎.

Comment on lines +11 to +12
ExecStartPost=-/usr/local/bin/node scripts/news/indexnow.mjs
ExecStartPost=-/usr/local/bin/node scripts/news/websub.mjs

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Notify search services after partial translation runs

If the bounded worker times out at 90 minutes or fails after exporting one or more languages, systemd does not execute ExecStartPost; the leading - only ignores failures of the post command itself. Consequently, successfully exported localized URLs from a partial run receive neither the promised IndexNow delta nor WebSub notification, and repeated late-language failures can prevent notifications indefinitely; place these notifications in an always-run cleanup path such as ExecStopPost or a wrapper.

Useful? React with 👍 / 👎.

Comment thread lib/news/sitemap.ts
Comment on lines +74 to 75
const urls = activeArticles.slice(offset, offset + SITEMAP_ARTICLE_BATCH_SIZE).map((article) => {
const locales = articleLocales(article);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep every hreflang variant as a sitemap URL

For sitemap-based hreflang, each alternate URL must have its own <url><loc> entry and repeat the complete alternate set, including itself. Mapping every article to only the English URL here—and doing the same for listing, topic, and country pages above—leaves the localized href values without reciprocal sitemap entries, so crawlers consuming the sitemap annotations cannot validate those language clusters and the localized pages are no longer directly submitted in the general sitemap.

Useful? React with 👍 / 👎.

This branch was successfully deployed

1 active deployment
Preview — 5e4c8eef Deployed Sep 19, 2026 by vercel[bot]
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.

1 participant