---
type: "Source File"
title: "CopeCheck content-generation incident — 1 August 2026"
description: "# CopeCheck content-generation incident — 1 August 2026 ## Summary The main `copecheck.com` site appeared stale even though its service, Cloudflare tunnel, cron entries and a secondary Codex feeder were still running."
resource: "https://www.copecheck.com"
tags: ["copecheck", "main", "source-file", "md"]
timestamp: "2026-08-02T08:43:32Z"
site: "main"
source_path: "copecheck/POSTMORTEM.md"
---

# CopeCheck content-generation incident — 1 August 2026

Source path: `copecheck/POSTMORTEM.md`  
Index snapshot generated: `2026-11-24T13:42:54Z`  
File modified: `2026-08-02T08:43:32Z`

```md
# CopeCheck content-generation incident — 1 August 2026

## Summary

The main `copecheck.com` site appeared stale even though its service, Cloudflare
tunnel, cron entries and a secondary Codex feeder were still running. The main
canonical generation pipeline last completed successfully at **2026-06-06
16:22:44 UTC**. A separately curated item was published on 10 June, after which
the homepage remained on June content. The UK pipeline continued publishing.

## Root cause

Two defects combined to make the failure both silent and misleading:

1. `/home/ben/infra/copecheck/run_pipeline.sh` enabled `set -u` before sourcing
[redacted secret-like line]
   dollar signs, so Bash interpreted parts of the hash as variable expansions
   and exited before starting Python. Because log redirection happened after
   the failing `source`, cron kept invoking the script without recording the
   failure in the pipeline log.
2. The secondary CopeCheck Codex publication path wrote `relevance=1.0`, while
   the main application treats relevance as a 0–100 score. Its homepage requires
   at least 35 and its indexing policy normally requires 65 or 75. Consequently,
   new Codex-generated records existed in SQLite but were hidden from the public
   homepage and marked `noindex`.

## Evidence

- Before repair, sourcing the main `.env` under nounset exited with status 1 at
[redacted secret-like line]
- Cron entries continued to invoke the main news pipeline hourly and the Cope
  pipeline every four hours.
- The main pipeline log's last successful completion was 6 June at 16:22:44 UTC.
- The database nevertheless contained Codex publications through 1 August, all
  using the incompatible relevance value. A total of 742 affected rows were
  identified and backfilled after an online SQLite backup.
- No n8n workflow or current CopeCheck source file referenced the deprecated
  DeepSeek model IDs `deepseek-chat` or `deepseek-reasoner`. A repaired manual
  run completed 30 analyses through the configured MiniMax model, ruling out
  those model IDs, expired credentials and exhausted LLM credit as this
  incident's cause.
- Disk usage was 55%; the main and UK web services were active; the Cloudflare
  tunnel already routed both hostnames; PostgreSQL and n8n were healthy.
- n8n contained feedback and suggestion notifiers, but no content-generation
  workflow. Generation is performed by the system cron scripts.

## Repair

- Quoted the bcrypt environment assignment without changing its value.
- Made both pipeline runners strict, mutually exclusive per mode, time-bounded,
[redacted secret-like line]
- Corrected future Codex publications to use `relevance=100` and the existing
  indexed/curated metadata; backfilled the 742 previously hidden rows.
- Removed the live Gemini credentials and direct Gemini fallbacks from both
  services. The initial replacement used direct MiniMax, with
  OpenRouter-hosted MiniMax as the remaining model fallback where configured;
  the main Codex-assisted publication path remained separate.
- After recovery, the main scorer was moved to the authenticated n8n Codex
  Runner using `gpt-5.6-luna` at maximum reasoning. Direct MiniMax and
  OpenRouter-hosted MiniMax remain automatic fallbacks; UK scoring remains on
  `MiniMax-M3`. A synthetic production-parser test returned
  `model=codex/gpt-5.6-luna` successfully.
- Added a site-wide AI notice, per-item AI labels, `/ai-disclosure`, and feed
  disclosure text. Future pages inherit the global notice from the base
  templates.
- Added and force-tested the n8n `CopeCheck Pipeline Failure Alert` workflow.
- Added an Uptime Kuma keyword monitor for
  `https://copecheck.com/health/content`. The endpoint exposes
  `COPECONTENT_RECENT` only when the newest public item is less than 36 hours
  old. The monitor is linked to the existing default notification channel.

## Verification

- The manual main run completed successfully on 1 August 2026 and published
  fresh items to the live homepage, including *Will AI make companies outsource
  more, or less?* (analysed at 15:08:22 UTC).
- Both public domains returned their disclosure pages and rendered the global
  footer notice and local score/article labels.
- The main RSS feed included the AI-generation disclosure in item descriptions.
[redacted secret-like line]
  event and a safe runner-level injected exit status of 97.
- Uptime Kuma recorded repeated successful heartbeats with the message
  `200 - OK, keyword is found`.

## Preventive actions

- Keep shell failures visible in `logs/runner.log` and application events in
  `logs/pipeline.log`.
- Preserve the per-mode locks and runtime limits so scheduled runs cannot pile
  up indefinitely.
- Treat `relevance` as a documented 0–100 value at every publication boundary.
- Retain the freshness monitor and synthetic failure-alert test in operational
  checks after pipeline or n8n changes.

## Follow-up: UK news timeout on 1 August 2026

### Stop time and impact

The last routine UK news run to complete normally started at 14:37 UTC. Runs
starting at 16:37, 18:37 and 20:37 UTC exceeded the 105-minute hard limit and
generated failure alerts at 18:22, 20:22 and 22:22 UTC respectively. Other UK
pipeline modes and the web service remained available.

### Root cause and evidence

The Google News RSS feeds returned opaque `news.google.com/rss/articles/...`
links. From this VPS those links entered Google's consent redirect loop.
Firecrawl waited 45 seconds for each link, then the trafilatura fallback failed
with too many redirects. Failed fetches did not increment the successful-item
cap, so the scanner could repeat this delay across as many as 240 feed entries.
The wrapper correctly terminated each run with status 124 after 105 minutes.

### Repair and verification

- Opaque Google News RSS redirect links are now skipped before network article
  extraction; a sufficiently detailed RSS description can still be processed.
- The existing UK `FETCH_TIMEOUT` setting is now passed to Firecrawl, reducing
  its per-article timeout from the library default of 45 seconds to 25 seconds.
- News mode now has an independent 4,500-second clean-exit budget, leaving a
  30-minute margin before the wrapper's 105-minute hard-failure limit.
- The pre-fix 22:37 process was stopped by its verified process groups so it
  could not emit another obsolete timeout alert.
- A production-environment end-to-end news test completed successfully at
  23:07:38 UTC with RSS, GNews and Google Alerts each processing one item. It
  exited with status 0, and n8n shows no failure-alert execution after the real
  22:22:02 UTC alert.

## Network-wide AI disclosure deployment on 2 August 2026

The AI transparency treatment was extended from the main and UK properties to
all 17 public CopeCheck subdomains. Each public content property now has a
near-content notice, persistent footer disclosure and local `/ai-disclosure`
page. JSON/RSS outputs that distribute generated analysis now carry an explicit
disclosure field or line.

The thesis property uses a separate, accurate notice: the thesis text, claims
and citations are hand-checked by the author; AI assists presentation,
formatting and evidence triage but does not approve the published thesis.

Codex was refreshed from its stale 15-site inventory to 18 public properties
(the main site plus 17 public subdomains), and its displayed scoring stage now
reflects Codex `gpt-5.6-luna` at maximum reasoning with MiniMax specialist and
fallback paths. `analytics.copecheck.com` was excluded because it is the
private Umami dashboard, and `manu.copecheck.com` was excluded because it maps
to the unrelated PPC service.
```
