Replace wrong variants (Federação Portuguesa de Andebol, FPAndebol) with the
official "Federação de Andebol de Portugal" in sanitizeArticleMeta.
Co-authored-by: Cursor <[email protected]>
Add Handball Planet and IHF feeds so the topic filter finds real
handball content instead of falling back to NBA/football. Also add
handball keywords and trusted domains.
Fixes off-topic content published to andebol.net (BIT-25828).
Co-Authored-By: Paperclip <[email protected]>
- Exclude *.example.json files from loadSiteConfigs (previously only
example.json was excluded, so andebol.net.example.json was loaded as
a live config with placeholder credentials)
- Correct wp_url from https://andebol.net/wp-json to https://andebol.net
(publisher appends /wp-json/wp/v2 itself; the old value caused a doubled
path and 404 on every REST call)
- Add credential injection in loadSiteConfigs: when user/password are
absent from the JSON, merge from ANDEBOL_NET_WP_USER/WP_PASSWORD env
vars (or generic WP_USER/WP_PASSWORD fallback)
With these fixes wp:test now reaches the correct endpoint and returns 401
instead of 404. Remaining blocker: WP_USER in .env is still a placeholder.
Paperclip-Task-Id: BIT-25761
Non-sensitive config (no credentials) with correct WP category IDs
for the backfill tool. Credentials are sourced from the LXC vault env.
Paperclip-Task-Id: BIT-25575
Real WordPress category IDs on andebol.net are 8-13, not placeholder 1-6.
Using wrong IDs caused backfill to silently assign non-existent categories.
Paperclip-Task-Id: BIT-25575
Corrects the undici override from >=7.28.0 (which resolved to 8.x) to
^7.28.0. undici 8.x requires Node >=22.19.0, breaking the CI runner on
Node 20. Version 7.28.0 fixes advisories GHSA-vmh5-mc38-953g and
GHSA-pr7r-676h-xcf6 while staying within the Node 20 engine constraint.
Paperclip-Task-Id: BIT-25575
Overrides form-data to >=4.0.6 and undici to >=7.28.0 to resolve high-severity
advisories GHSA-hmw2-7cc7-3qxx (CRLF injection) and GHSA-vmh5-mc38-953g/GHSA-pr7r-676h-xcf6
(TLS bypass + cache disclosure) introduced by the axios transitive dependency.
Paperclip-Task-Id: BIT-25575
Drop hallucinated athlete/team tags and derive Yoast fields only from
published article content. Adds backfill tool for live andebol.net posts.
Co-authored-by: Cursor <[email protected]>
Add category-infer.js with rule-based slug detection for andebol.net
(selecao, clubes, competicoes, internacional, resultados, nacional).
Add wp-categories.js to resolve WP category IDs via API or category_map.
Wire resolvePostCategoryIds into both REST and XML-RPC publish paths.
Add tools/backfill-wp-categories.js for one-shot backfill of uncategorized posts.
Add config/sites/andebol.net.example.json as reference site config template.
Persist article tags and category in persist-generated-article.js.
Paperclip-Issue: BIT-25575
Paperclip-Agent: Tiago Neves (id 5d084b36-f38f-42a5-a92a-520005afda4f)
The /metrics endpoint returns JSON, not Prometheus exposition format.
The BIT-3601 Prometheus check was added before the app implemented it,
causing staging deploys to always fail the health check and roll back.
Remove the exposition-format check; JSON schema validation remains.
Paperclip-Issue: BIT-22325
Paperclip-Agent: tiago-neves
Staging CT had diverged local commits from a previous rollback that pushed a
revert commit to the remote. git pull --ff-only was failing with
"Not possible to fast-forward". Replace with git reset --hard origin/<branch>
so staging always matches remote state regardless of local history.
Rollback now uses git reset --hard HEAD@{1} locally instead of reverting and
pushing to origin — staging rollback has no business touching the remote repo.
Paperclip-Issue: BIT-22325
Paperclip-Agent: tiago-neves
CI lint job has no eslint-plugin-import installed, so the inline
disable-next-line for that rule itself raises an "unknown rule" error
on `tools/seed-smoke-verification-article.js`. Drop the import-related
token from the disable comment and keep only the still-valid
`global-require` disable for the lazy require of `dotenv`. No
behaviour change; the file still tries dotenv and silently continues
without it.
Paperclip-Issue: BIT-21924
Paperclip-Run: bb6e49a5-4f6d-4a8e-a4dd-ee75d961b36f
verification_report.sources now use google_factcheck, claimcheck, and cross_reference with per-source status/confidence.
Slug smoke-verification-bit21924; skip if any row already has the three paths (idempotent across legacy smoke rows).
Paperclip-Issue: BIT-21924
Paperclip-Run: 6be4879b-b739-479f-a6f9-f08d0654678d
Wire GET /api/ui/articles (documented but missing) so curl/JQ checks work against the article log.
Add idempotent seed helper, npm run seed:smoke-verification, and admin POST /ui/seed/smoke-verification for operators without SSH to the CT.
Paperclip-Issue: BIT-21924
Paperclip-Run: 4105a0ac-e90c-477f-8065-10419988abdf
- Remove `npm run lint --quiet` from SSH deploy step: eslint is a
devDependency excluded by --omit=dev, and CI already passed lint
before the merge — re-running on staging is both redundant and broken.
- Change `git revert HEAD --no-edit` to `git revert HEAD -m 1 --no-edit`
so the rollback step handles merge commits correctly.
Staging deploy previously chained only off develop CI and hard-coded git
pull develop. Remote develop was missing or protected while PR #18 merged to
main. Watch develop and main; set STAGING_GIT_BRANCH from workflow_run or
dispatch ref; align rollback push and pull with the same branch.
Docs: DEPLOYMENT runbook diagram and manual-dispatch notes.
Co-authored-by: Cursor <[email protected]>
Run verifyArticle before appending article JSONL via persistGeneratedArticle
(index, CLI write/listen). Article rows store a bounded snapshot; /ui dashboard
shows Verificação with per-source details in a disclosure.
Paperclip-Issue: BIT-21733
Paperclip-Run: 87279bca-68e7-410b-bdc5-ff25cc08e671
Add src/research/index.js as the single entry point that composes the
existing source modules already on main (Google Fact Check, ClaimBuster,
cross-reference) plus extractClaims and aggregateVerificationResults
into one verifyArticle(article) call.
Behaviour:
- Honours researchConfig() — short-circuits with status:'disabled'
when RESEARCH_ENABLED is false (opt-in feature flag, no default
network calls).
- Returns status:'skipped' for empty articles.
- Queries the three sources in parallel via Promise.all.
- Wraps each source in safeQuery so a thrown error is contained as
status:'error', logged, and excluded from the aggregate — partial
outage of one source never blocks the publish pipeline.
- Result shape: { status, overall_confidence, sources, claims }
matching the surface aggregateVerificationResults already produces.
Tests: 5 new cases in src/research/index.test.js cover disabled,
empty article, three-source aggregation (matches aggregator weighted
contract: 0.50/0.35/0.15 → 72), partial-outage containment, and
all-skipped → status:'skipped'.
Source modules and their tests (aggregator, claims, config, sources/*)
are not touched: prior PRs already merged refined versions of those
files to main; this change only adds the missing orchestrator that
wires them together.
Paperclip-Issue: BIT-3602
Paperclip-Run: 31991727-135e-4c6b-ba11-982068f121de