Disable Record/SAPO/Guardian world feeds that are not handball-scoped
(BIT-22288). Shortlist andebol.net items with topic handball only so new
drafts align with owner editorial rules.
Co-authored-by: Cursor <[email protected]>
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]>
Enforce BIT-22288: extract og/twitter images at ingest, RSS image
enclosures, optional HTML refetch before publish, upload to WP media
with caption and alt_text, and set featured_media on draft posts.
Fail closed when no usable image URL exists. Optional ANDEBOL_WP_SITE_DOMAIN
for X-Site-Domain on bridge-hosted WordPress.
Co-authored-by: Cursor <[email protected]>
Cache Rule applied 2026-05-12T22:39 UTC; both zones now return cf-cache-status:
HIT on repeat GET /. TTFB on HIT ~81-130 ms (down from ~220-380 ms DYNAMIC).
Co-Authored-By: Paperclip <[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
Add /api/ exclusion and per-zone filter expressions in deployment.md.
Record continuation verification in PERFORMANCE_BASELINE (still DYNAMIC).
Execution moves to Paperclip child BIT-21912 for DevOps dashboard apply.
Co-authored-by: Cursor <[email protected]>
All direct children are done on the board; mark parent BIT-2030 done,
update objective #2 and WIP section, and note sweep completion in intro.
Co-authored-by: Cursor <[email protected]>
Cache-Control headers (BIT-2261) confirmed live on both domains.
TTFB improved from ~300ms to ~220ms. Remaining gap: Cloudflare Cache
Rule needed for HTML caching (cf-cache-status still DYNAMIC).
Paperclip-Issue: BIT-21610
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
Record the daily fila orphan_lock escalation subtask as an operational
child of BIT-2030 for parity with the board tree.
Co-authored-by: Cursor <[email protected]>
Add runbooks README cross-reference to PROJECT_STATUS/architecture
objectives. Extend PROJECT_STATUS with child BIT-21610 and WIP row for
post-baseline production cache/TTFB validation.
Co-authored-by: Cursor <[email protected]>
Refresh docs/PROJECT_STATUS.md against API state: BIT-2030 remains
in_progress; BIT-2078 and BIT-2080 are done; BIT-2079 is in_progress.
Objective #2 and WIP table now reference PERFORMANCE_BASELINE and
post-audit remediation instead of a stale open audit task.
Co-authored-by: Cursor <[email protected]>
The bridge imported ./lib/errorReporter.mjs but tsc never emitted that file
into dist/, so production systemd crashed with ERR_MODULE_NOT_FOUND. Move
the module to TypeScript so `npm run build` produces dist/lib/errorReporter.js.
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.
Add NEWS_PLATFORM_INCIDENT_RUNBOOK_BIT3915 with detection/recovery for the
writer-pipeline HTTP aggregator, lag signals, and escalation ladder. Cross-link
from monitoring, aggregator operations, and the runbooks index.
Made-with: Cursor
Maps all 12 project objectives against delivered scope, links active
Paperclip sweep (BIT-2030) and open child issues (BIT-2079, BIT-2080),
and summarises the full repo tree for governance visibility.
Co-Authored-By: Paperclip <[email protected]>
Add docs/runbooks/README.md linking BIT-746 escalation, monitoring,
deployment, smoke script, and paperclip company runbook index. Surface
the index from README and docs/monitoring.md.
Paperclip-Agent: David Santos (urlKey david-santos; id 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376)
Paperclip-Issue: BIT-1951
Paperclip-Run: ac17e30b-ad9a-46fd-bdb6-ffdfa0d99242
Made-with: Cursor
Report 5xx errors from the Fastify error handler to the central ingest API.
Enabled when ERROR_REPORTING_TOKEN is set in the environment.
Paperclip-Agent: peter-spark
Paperclip-Issue: BIT-750
Paperclip-Run: c2c29aef-e79f-4e69-98ed-3353d04b7a6d
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
Add Record and SAPO RSS, Guardian world and BBC handball; cap noisy RSS via
maxItems. Document Lusa/wire and ToS notes in AGGREGATOR_OPERATIONS.
Paperclip-Agent: José Alves (urlKey jos-alves; id 11179220-3cec-4f0f-880d-2771ff64fce8)
Paperclip-Issue: BIT-741
Paperclip-Run: ce6e2b51-1a3f-46f5-b479-2500427a0327
Made-with: Cursor
- Set document language to full BCP-47 from domain config (e.g. pt-PT).
- Extend ui-i18n with service errors, ad labels, ARIA landmarks, category
meta fallback, and localized search upstream message.
- Localize ArticleHeader (dates, reading time, breadcrumb); omit duplicate
breadcrumb when institutional chrome already provides one.
Docs: add docs/i18n.md strategy sketch; domains.md and deployment.md
(BRIDGE_INTERNAL_URL) cross-links.
Paperclip-Agent: ac1be104-8818-496a-80c5-fbc590a87855
Paperclip-Issue: 182b154e-5ad4-4965-9f30-50a66ef51ce0
Paperclip-Run: 6ce7746f-bfb6-4486-a1f5-aed26fe8e149
Made-with: Cursor
Introduces comprehensive editorial standards for andebol.net to ensure:
- Only Portuguese-language (PT-PT) content is published
- Real, verifiable news with proper source attribution
- No plagiarism or copy-pasted content
- Clear content categories, writing templates, and quality checklist
Addresses the urgent need for editorial governance following an English-language
article publication incident. Includes templates for match reports, transfers,
analysis, and competition updates.
Updates writer pipeline docs to reference the new editorial brief.
Paperclip-Agent: f0251a61-38e1-4a9b-8cd1-38d96a320cab
Paperclip-Issue: BIT-740
Paperclip-Run: 248bfdd9-8f8e-4ff3-8f25-1726da6a5e16
When the Astro server could not reach the bridge health endpoint, the
code fell back to MockBridgeClient, which serves English placeholder
articles and a fictional author name. That was indexed and shown on
andebol.net (BIT-738).
Introduce resolveSsrBridge() so production never uses the mock; allow
BRIDGE_INTERNAL_URL to override the domain JSON endpoint for real
deploy topology; adjust pages and sitemap accordingly.
Made-with: Cursor
Implement BIT-709 acceptance: GET /search and /stats on the writer-pipeline
aggregator; bridge AggregatorClient calls /search and maps items with
source_url. /writers/:id/candidates merges aggregator-first with WordPress,
exposes candidate_source and matched_sources, and passes max_age_hours into
ranking. Add docs/AGGREGATOR_OPERATIONS.md and store unit tests.
Paperclip-Issue: BIT-709
Made-with: Cursor
Align andebol.net-style category and archive routes with the /noticias editorial
pattern: gradient masthead, lead article plus two-column grid, optional most-read
sidebar from bridge trending, and hub pagination styling. Non-institutional
themes keep the previous simple grid and header.
Made-with: Cursor