Add html_listing ingest for Record and A Bola andebol sections and
revista_imprensa PDF index parsing from FPA media. Document AGGREGATOR_URL
in bridge.env.example and AGGREGATOR_OPERATIONS.md.
Paperclip-Issue: BIT-25559
Paperclip-Run: 0ab092e1-68ab-4e5a-90bd-4262e9c3d9fc
Writer systemd oneshots run as www-data but deploy never chowned
writer-pipeline/var, causing EACCES on aggregated-items.json when
the store was created by root. Mirror BIT-743 bridge/config/writers
fix; rebuild writer-pipeline on webhook when that tree changes.
Paperclip-Issue: BIT-25140
Co-authored-by: Cursor <[email protected]>
Wire run-cycle ingest and publish errors to errors.bitreport.pt using the
same reporter as bridge; document ERROR_REPORTING_* in writer env examples.
Paperclip-Agent: Artur Moreira (id ac1be104-8818-496a-80c5-fbc590a87855)
Paperclip-Issue: BIT-25125
Paperclip-Run: 06e3abea-e97b-481b-a1d5-70b286cf8983
Co-authored-by: Cursor <[email protected]>
CT222 news-project-test changed IP following DHCP re-lease (BIT-24050
emergency fix). IP is now static at 10.10.50.204 via systemd-networkd.
Update all doc references, deploy script post-install notes, and
wordpress/README direct-access URLs.
Paperclip-Agent: Tiago Neves (devops; id 5d084b36-f38f-42a5-a92a-520005afda4f)
Paperclip-Issue: BIT-24053
Paperclip-Run: 9c69919d-4c21-48b0-8eb7-2b9745bed65c
/entrar and /registar redirected to / because !config.auth_links is
truthy when auth_links is undefined (config fallback). Change both
pages to config.auth_links === false so only an explicit opt-out sends
the user home; missing or true both forward to wp-login.php.
Also add Cache-Control: no-store to the redirect response so edge
proxies never cache auth flows, and extend smoke-andebol.sh to assert
/entrar and /registar resolve to a wp-login URL.
Paperclip-Issue: BIT-22298
Paperclip-Agent: d706f4e6-5d05-4cec-b6e8-f8fb1f203aae
When RSS/HTML provide no image, optional WRITER_WEBDAV_* env enables PROPFIND
depth-1 listing, headline-based file pick, Basic-auth GET, and WP caption from
Credit___filename pattern or WRITER_WEBDAV_DEFAULT_CREDIT (BIT-22292).
Co-authored-by: Cursor <[email protected]>
Five bugs found and fixed during live application to andebol.net and
newsproject.bitreport.pt:
- Endpoint was /entrypoints (plural); CF API requires /entrypoint (singular)
- origin_cache_control alone does not cache HTML on CF Free; added
edge_ttl: {mode: override_origin, default: 60} which is required
- starts_with operator not supported on CF Free plan; replaced with contains
- newsproject.bitreport.pt has no own CF zone; zone lookup must use bitreport.pt
- Verification used curl -I (HEAD); rule expression matches GET only, so
verification must use GET requests (-D - -o /dev/null)
Paperclip-Issue: BIT-21922
Cloudflare HTML Cache Rule apply + verify script for andebol.net and
newsproject.bitreport.pt. Needs CF_API_TOKEN (Cache Rules write); auto-
discovers zone IDs, upserts the rule from deployment.md runbook expression,
and runs double-curl verification. Ready to run once token is injected.
Paperclip-Issue: BIT-21912
Daily oneshot cycle at 06:00 UTC via news-writer-andebol.timer;
env template covers ANDEBOL_WP_* credentials; deployment.md updated
with install steps, log tailing, and manual test run instructions.
Paperclip-Issue: BIT-2079
resolveSsrBridge now treats non-2xx /health as failure in production.
news-bridge no longer waits for news-frontend; frontend Wants+After
bridge so the API is up when Astro starts. Document the PT 503 string
and recovery commands in the BIT-746 runbook.
Extend healthcheck.sh with optional BRIDGE_DEEP_URL and PUBLIC_PAGE_URL
(customer-facing HTTPS with redirects). Document must-not-fail checks,
intervals, and escalation in docs/monitoring.md and a dedicated runbook.
Paperclip-Issue: BIT-746
Paperclip-Run: 04281f51-59ac-4267-a269-f12269dc2320
Paperclip-Agent: Tiago Neves (urlKey tiago-neves; id 5d084b36-f38f-42a5-a92a-520005afda4f)
Made-with: Cursor
Automated health monitoring for the news-platform services on CT222,
motivated by the bridge crash-loop incident (BIT-743) where 3,608
restarts went undetected until manual discovery.
Health endpoints:
- Bridge /health enhanced with optional ?checks=true for deep
dependency probes (WordPress, Redis) and uptime reporting
- Frontend /health.json added as Astro API route
Monitoring infrastructure:
- healthcheck.sh: periodic probe script with HTTP checks, systemd
restart-count detection, cooldown logic, and Ntfy push alerting
- news-healthcheck.timer: runs every 3 min (detection < 5 min)
- [email protected]: OnFailure template for instant crash alerts
- All three service units updated with OnFailure= directive
- deploy.sh updated to install monitoring units and env file
Paperclip-Agent: peter-spark
Paperclip-Issue: BIT-744
Paperclip-Run: 405ab587-8b8b-4963-8867-0feb95a994e3
The module-level singleton called mkdirSync('config/writers') which
fatally crashed the bridge when running as www-data without write
permission to the working directory. The bridge has been crash-looping
with restart counter >3600, taking andebol.net offline.
Constructor now catches EACCES gracefully (warn + degrade) instead of
killing the process. Deploy scripts also ensure the directory exists
with correct ownership.
Paperclip-Agent: peter-spark
Paperclip-Issue: BIT-743
Paperclip-Run: 817ec0b4-3778-44ae-8c07-efd97a2bdd86
- Use wordpress:6-php8.3-fpm with nginx:alpine sidecars; keep host ports 8080/8081
- Add shared wp_html / wp_andebol_html volumes so nginx can serve the same docroot as FPM
- Nginx: try_files permalinks, proxy headers, HTTP_AUTHORIZATION for App Passwords
- Update deploy scripts to force-recreate nginx with wordpress when public URL is fixed
- Refresh README and deployment docs
Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor
- Assert GET /search, /search?q=te, /category/all return 200
- Use SMOKE_HOST instead of HOST for the vhost header (HOST=0.0.0.0 in agent envs caused 403)
Made-with: Cursor
WordPress article images (featured_media) are served from /wp-content/uploads/.
The existing /wp-content/ block restricts access to RFC1918 IPs, blocking public
browsers from loading article images. Add a longer ^~ prefix match for the uploads
subdirectory so it wins over the restricted block, with 7d cache headers.
Paired with setting ANDEBOL_WORDPRESS_PUBLIC_URL=https://andebol.net in .env so
WordPress returns public image URLs instead of localhost:8081.
Co-Authored-By: Paperclip <[email protected]>
Add domain-aware theme system (BIT-494, BIT-495, BIT-496, BIT-497):
- Theme architecture: move shared components into src/themes/sports/,
create src/themes/institutional/ with handball-oriented design
- Domain config: andebol.net.json (institutional theme, pt-PT locale,
handball categories, WP endpoint port 8081)
- theme.ts library: resolves theme components per domain config
- Updated layouts/pages to use theme-aware component loading
- Updated docs: domains.md, frontend.md with theme system docs
- Smoke test script for andebol.net
- WordPress .env.example with andebol env vars
Note: this work was completed in BIT-494/495/496/497 but was
never committed — committing now to unblock andebol.net deploy.
Co-Authored-By: Paperclip <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Use default_server and server_name _ so domains like andebol.net reach Astro
instead of the Debian nginx welcome page. Install map Host→WordPress port
(8080 default, andebol.net→8081). deploy.sh and webhook-deploy install
conf.d snippet and remove sites-enabled/default.
docs/deployment.md: document multi-domain NPM workflow.
Refs: BIT-345
Add wordpress-ensure-public-url.sh (exit 2 when .env updated) and
wordpress-sync-options-url.sh to align siteurl/home with HTTPS. Wire
into deploy.sh and webhook-deploy.sh for /opt/news-platform only so
the board does not need manual .env or SQL for BIT-470/BIT-471.
Made-with: Cursor
Preserve X-Forwarded-Proto from the edge proxy in CT nginx so WordPress
sees HTTPS. When WORDPRESS_PUBLIC_URL still defaults to localhost:8080,
derive WP_HOME/WP_SITEURL from Host and forwarded headers for proxied
requests (X-Forwarded-For present). Document behaviour in deployment and
wordpress README.
Made-with: Cursor
Align README and deployment.md with reality: allow/deny use $remote_addr
on the CT, so a private-IP reverse proxy makes /wp-admin/ reachable from
the public Internet. Add nginx header comments and optional real_ip notes.
Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor
- Forward X-Site-Host from Astro to the bridge so loopback calls use the public domain JSON
- Normalize newsproject.bitreport.pt.json (categories slug/label, wp on 127.0.0.1:8080)
- Degrade homepage/trending when WordPress is down instead of 500
- Extend webhook-deploy.sh for config/ and wordpress/ changes; add deploy-hook-server + systemd unit
- Document automatic Gitea webhook flow in docs/deployment.md; align DOMAINS_CONFIG_PATH env
Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor
Without this, pino-pretty (devDep) was required at runtime causing
the bridge service to crash on first boot.
Co-Authored-By: Paperclip <[email protected]>