Skip to content

Simple guide · Overview

Page status: Active

NutsNews Worker Local AI Lock

The public web repo does not deploy the ingestion Workers. Worker shard deployment lives in ramideltoro/nutsnews-worker.

Visual overview

Primary diagram

System map

The public web repo does not deploy the ingestion Workers. Worker shard deployment lives in ramideltoro/nutsnews-worker.

Render the repository-owned system map when you need it.

Diagram is not rendered yet.

View as text
NutsNews Worker Local AI Lock

The public web repo does not deploy the ingestion Workers. Worker shard deployment lives in ramideltoro/nutsnews-worker.

flowchart TD
  accTitle: NutsNews Worker Local AI Lock
  accDescr {
    The public web repo does not deploy the ingestion Workers. Worker shard deployment lives in ramideltoro/nutsnews-worker.
  }
  A["Public web repo updates worker docs"] --> B["Worker repo (`nutsnews-worker`) owns shard deploys"]
  B --> C["Local-AI lock validation"]
  C --> D["Require AI_PROVIDER=local"]
  D --> E["Require LOCAL_AI_URL endpoint"]
  E --> F["Require LOCAL_AI_API_KEY from Secrets Store"]
  F --> G["Require AI_PROVIDER_FALLBACK_TO_OPENAI=false"]
  G --> H["Require AI_REVIEW_CONCURRENCY=1"]
  H --> I["Deploy shard with lock enforced"]
  I --> J["Workers process feed and article AI tasks"]
  J --> K["AI decisions stay local-first"]
  K --> L["Admin telemetry + Worker response confirm source"]
  L --> M["Public API health check"]
  M --> N["Articles API health request returns 200 + JSON"]
  N --> O["Lock effectiveness verified"]
  P["Reference artifacts"] --> Q["`docs/LOCAL_AI_DEPLOYMENT_LOCK.md`"]
  P --> R["`docs/HOME_SERVER_LOCAL_AI.md`"]
  P --> S["`scripts/assert_worker_local_ai_lock.mjs`"]

NutsNews Worker Local AI Lock

Fullscreen diagram view.

The public web repo does not deploy the ingestion Workers. Worker shard deployment lives in ramideltoro/nutsnews-worker.

The Worker repo now has a local-AI deployment lock so shards cannot accidentally deploy as OpenAI-first workers. The lock requires:

  • AI_PROVIDER=local
  • LOCAL_AI_URL set to the home-server or Cloudflare Tunnel local AI endpoint
  • LOCAL_AI_API_KEY bound from Cloudflare Secrets Store
  • AI_PROVIDER_FALLBACK_TO_OPENAI=false
  • AI_REVIEW_CONCURRENCY=1

The website displays articles that Workers review, summarize, translate, and publish. If Worker shards fall back to OpenAI, the web app still works, but OpenAI usage and cost increase and the local server is no longer the source of AI decisions.

Use the Worker repo docs:

  • docs/LOCAL_AI_DEPLOYMENT_LOCK.md
  • docs/HOME_SERVER_LOCAL_AI.md
  • scripts/assert_worker_local_ai_lock.mjs
  • scripts/worker_offline_e2e_regression.mjs

After the Worker preview/production check looks good, verify the website still renders fresh stories:

Terminal window
curl -I https://nutsnews.com/api/articles?limit=5
curl https://nutsnews.com/api/articles?limit=5

Look for a normal 200 response and article JSON. The AI provider is verified from the Worker response and admin telemetry, not from the public article API.