Skip to content

fix(news): remove mock headlines and disclose feed provenance (#3) - #15

Merged
ayushcmd merged 1 commit into
mainfrom
fix/issue-3-news-integrity
Dec 1, 2026
Merged

ayushcmd merged 1 commit into
mainfrom
fix/issue-3-news-integrity

Conversation

@ayushcmd

@ayushcmd ayushcmd commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Closes #3

Changes

  • Remove all hardcoded April 2025 fallback articles and misleading publisher attributions. Return explicit provider, stale or unavailable feed status, reason and retrieval timestamp.
  • Validate original HTTP(S) article URLs (reject publisher root links, credentials and malformed URLs), timestamps, publisher and title; deduplicate and sort provider articles within a seven-day publication window. Remove fabricated sentiment and reading-time labels.
  • Cache per commodity for three hours, retain last successful feed for up to 48 hours on failure, coalesce concurrent same-filter refreshes, and apply failure and rate-limit cooldowns. Handle missing credentials, timeout, 429, access denial and invalid provider responses without exposing credentials.
  • Display publication dates, original links, provider source, cache age, stale and unavailable messages, and retry controls. Reject old unmarked news arrays and cancel superseded requests.
  • Add 10 mocked backend regression tests and document the new API contract. Existing PR workflow runs backend tests, TypeScript and Next.js build.

Review notes

  • Tests/builds have not been executed locally; verify GitHub Actions and preview before merging. Production NewsAPI credentials, plan/licensing, article availability and browser interactions remain unverified. Article URL structure is checked, not individual publisher page reachability or truthfulness.
  • The news endpoint changes from an array to an envelope. Deploy the matching frontend/backend together, or frontend first (it rejects legacy arrays). Old frontend cannot consume the new response. Cache is process-local, not a distributed quota; three-hour cache and 48-hour stale maximum are deliberate defaults to reduce upstream usage. No new provider or credentials added.

Do not merge until review is complete.

@vercel

vercel Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
commoditychain Ready Ready Preview Dec 1, 2026 12:58pm UTC

@coderabbitai

coderabbitai Bot commented Dec 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 5 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6bc42bcf-ade4-4fdd-995e-288acd877da3
Commits

Reviewing files that changed from the base of the PR and between 4938a40 and 28f51af.

Files selected for processing: 7

  • README.md
  • backend/routers/news.py
  • backend/tests/test_news_integrity.py
  • docs/news-data-contract.md
  • frontend/src/app/news/page.tsx
  • frontend/src/lib/api.ts
  • frontend/src/types/index.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@netlify

netlify Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for commoditychain ready!

Name Link
🔨 Latest commit 28f51af
🔍 Latest deploy log https://app.netlify.com/projects/commoditychain/deploys/6b0ec45aed9a76e102896ff6
😎 Deploy Preview https://deploy-preview-15--commoditychain.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@ayushcmd
ayushcmd merged commit 43918a2 into main Dec 1, 2026
9 checks passed

This branch was successfully deployed

1 active deployment
Preview — 28f51afe Deployed Dec 1, 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.

fix(news): Replace stale unverified fallback headlines with transparent empty/demo states

1 participant