Skip to content

fix(news): unify digest publication acceptance - #7599

Merged
koala73 merged 3 commits into
mainfrom
codex2/fix-news-digest-publication-acceptance
Sep 3, 2026
Merged

fix(news): unify digest publication acceptance#7599
koala73 merged 3 commits into
mainfrom
codex2/fix-news-digest-publication-acceptance

Conversation

@koala73

@koala73 koala73 commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

A non-empty but materially narrower digest can no longer replace the canonical cache while the durable fallback keeps the richer snapshot. Canonical and durable publication now use one atomic acceptance decision, so newsInsights and other canonical readers retain the last accepted breadth and depth.

The gate keeps the current URL-revocation behavior, six-hour durable expiry, and 15-minute canonical expiry. Rejected candidates now have a distinct diagnostic from Redis or source failures.

Validation

  • node --import tsx --test tests/digest-lastgood-script.test.mjs tests/digest-lastgood.test.mts tests/redis-caching.test.mjs - 159 passed, 0 failed after rebasing onto current main
  • npm run typecheck:api - passed after rebase
  • npm run lint:boundaries - passed after rebase
  • npm run test:data - 29,776 passed, 37 skipped, 0 failed before the unrelated one-commit base refresh

Compound Engineering
Codex GPT-5

@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
worldmonitor Ready Ready Preview Sep 3, 2026 4:41pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 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-03T15:38:28.882372Z 6cfa484 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.

@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: 6cfa484994

ℹ️ 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".

// The fetcher publishes attempt + sentinel atomically. Letting the
// generic wrapper write its own sentinel first would detach identity.
cacheFailures: false,
cachePositiveResult: false,

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 digest requests coalesced through publication

When the canonical key is missing, cachePositiveResult: false lets the shared fetch promise resolve and delete its inflight entry before publishAcceptedSnapshot starts. A second request reaching the same isolate while the acceptance EVAL is still running therefore sees another cache miss with no in-flight leader and launches the full RSS digest build again; previously, the positive SET completed inside the shared promise, so this publication interval remained coalesced. Keep the in-flight entry alive until the caller-owned atomic publication finishes.

Useful? React with 👍 / 👎.

Keep canonical and durable digest snapshots behind one acceptance gate so a narrower candidate cannot land first.
@koala73
koala73 force-pushed the codex2/fix-news-digest-publication-acceptance branch from 43e4a47 to f6a9eba Compare September 3, 2026 16:34
@koala73
koala73 merged commit 74cdf2d into main Sep 3, 2026
42 checks passed
@koala73
koala73 deleted the codex2/fix-news-digest-publication-acceptance branch September 3, 2026 16:46
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