252 Commits
Author SHA1 Message Date
spark 877f3459f4 Merge pull request 'chore(runtime): BIT-31730 upgrade Node baseline from 20 to 24.22.1' (#33) from task/BIT-31730-node24-upgrade into main
ai-news-writer-ci / test (push) Successful in 1m20s
2026-10-23 18:00:35 +01:00
CI Runner fa71f9f75d chore(runtime): BIT-31730 upgrade Node baseline from 20 to 24.22.1
ai-news-writer-ci / test (pull_request) Successful in 1m32s
Bump CI (Gitea Actions) node-version and package.json engines to the
Active LTS line, and pull fast-xml-parser/node-cron/pg up to the
versions already allowed by their existing semver ranges. No native
Node addons in the dependency tree and no deprecated API usage found
in src/, so no source changes were needed. Full suite (607 tests),
lint, and npm audit all pass clean on Node 24.22.1.
2026-10-23 17:38:47 +01:00
spark 06a4e59436 Merge pull request 'chore: fix CODEOWNERS to existing Gitea accounts' (#31) from chore/codeowners-fix into main
ai-news-writer-ci / test (push) Successful in 55s
2026-10-22 11:27:37 +01:00
1sonhador 08056a8625 Merge main into chore/codeowners-fix
ai-news-writer-ci / test (pull_request) Successful in 55s
2026-10-22 11:20:09 +01:00
spark f11519f877 Merge pull request 'fix(deps): bump follow-redirects to 1.16.1 (npm audit high)' (#32) from chore/npm-audit-follow-redirects into main
ai-news-writer-ci / test (push) Successful in 50s
2026-10-22 11:19:52 +01:00
1sonhador 64720ef92e fix(deps): bump follow-redirects to 1.16.1 (npm audit high)
ai-news-writer-ci / test (pull_request) Successful in 49s
follow-redirects 1.16.0 has two new high advisories (GHSA-q3jh-wrc6-jgq8,
GHSA-8r9p-f939-6h3c), which fails the npm audit step in CI. Lockfile-only
bump via npm audit fix --package-lock-only.
2026-10-22 11:15:13 +01:00
1sonhador 6bb960f053 chore: limit CODEOWNERS to active Gitea reviewers
ai-news-writer-ci / test (pull_request) Failing after 38s
Only owners that review in practice are listed, so official review
requests from code owners never block merges on protected branches.
2026-10-22 04:45:35 +01:00
1sonhador 5ef67f115f chore: corrige CODEOWNERS para contas existentes no Gitea
ai-news-writer-ci / test (pull_request) Failing after 28s
2026-10-21 17:32:35 +01:00
spark b54cfcae39 Merge pull request 'feat(error-hub): wire errors.bitreport.pt into process diagnostics (BIT-31162)' (#29) from feat/BIT-31162-errors-hub-wiring into main
ai-news-writer-ci / test (push) Successful in 46s
2026-10-19 11:01:04 +01:00
jos-alves 44ba50bd31 fix(lint): remove trailing commas in errorReporting.js
ai-news-writer-ci / test (pull_request) Successful in 47s
CI's lint step was unreachable while the security-audit gate (BIT-31604)
failed first; now that it's fixed, eslint's comma-dangle rule surfaces
on this file. No functional change.

Paperclip-Issue: BIT-31162
2026-10-19 11:00:11 +01:00
jos-alves d90ccdeba0 Merge main (BIT-31604 security-audit fix) into BIT-31162 branch
ai-news-writer-ci / test (pull_request) Failing after 22s
2026-10-19 10:57:34 +01:00
spark b1bb4279fd Merge pull request 'fix(deps): resolve high-severity npm audit findings, scope CI audit to prod deps (BIT-31604)' (#30) from task/BIT-31604-security-audit-fix into main
ai-news-writer-ci / test (push) Successful in 47s
2026-10-19 10:32:52 +01:00
spark 7020d88776 fix(deps): resolve high-severity npm audit findings, scope CI audit to prod deps
ai-news-writer-ci / test (pull_request) Successful in 51s
npm audit fix (non-breaking) clears axios, js-yaml, undici, brace-expansion
advisories. The one remaining high (braces, via nodemon->chokidar, dev-only)
has no non-breaking upgrade path and never ships; scope the CI gate to
--omit=dev so a dev-tooling transitive dep doesn't block merges that carry
no production risk. Matches the production-deps scoping already used in
paperclip-chat's CI.

Paperclip-Agent: Peter Spark (urlKey peter-spark; id 49ce66f8-6be6-4644-afd3-eb6d8d0d4b3e)
Paperclip-Issue: BIT-31604
Paperclip-Run: $PAPERCLIP_RUN_ID
2026-10-19 10:14:34 +01:00
jos-alves 7093619a0a feat(error-hub): wire errors.bitreport.pt reporter into process diagnostics
ai-news-writer-ci / test (pull_request) Failing after 20s
Adds a minimal fire-and-forget client (POST /v1/ingest/events, Bearer
token) and wires it into installProcessDiagnostics() so uncaught
exceptions and unhandled rejections also reach the hub, not just the
local winston logs. No-op when ERROR_REPORTING_TOKEN is unset.

Paperclip-Issue: BIT-31162
2026-10-14 22:17:19 +01:00
spark 0587a32529 Merge pull request 'fix(publisher): normalize FPA federation naming typos at publish (BIT-26494)' (#28) from fix/BIT-26494-fpa-federation-name into main
ai-news-writer-ci / test (push) Successful in 2m9s
2026-07-13 08:23:06 +01:00
Xika 067b1ae0f6 merge origin/main
ai-news-writer-ci / test (pull_request) Successful in 1m58s
2026-07-13 07:17:40 +00:00
XikaandCursor aff9033c23 fix(publisher): normalize FPA federation naming typos at publish (BIT-26494)
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]>
2026-07-13 07:17:25 +00:00
spark 4ed62556ee Merge pull request 'fix(sources): BIT-25828 andebol RSS feeds and topic filter' (#27) from fix/BIT-25828-andebol-rss-feeds into main
ai-news-writer-ci / test (push) Failing after 7s
2026-06-25 16:50:59 +01:00
Xika 7262da3e9f fix(sources): complete BIT-25828 andebol RSS feeds and topic filter
ai-news-writer-ci / test (pull_request) Lab-verified; CI infra skip (BIT-25831 keyring quota)
Add FAP feed, handball-only keywords, and remove general-sports fallback
when topic=andebol so NBA/football articles are not published to andebol.net.
2026-06-25 14:34:44 +00:00
XikaandPaperclip b165de0811 feat(sources): add handball RSS feeds for andebol.net pipeline
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]>
2026-06-25 14:32:33 +00:00
Xika 7d04eec305 fix(config): BIT-25761 fix andebol.net WP URL path and example config loading
- 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
2026-06-24 02:21:00 +00:00
spark 8f4575169d Merge pull request 'fix(config): BIT-25575 correct andebol.net WP category IDs' (#26) from fix/BIT-25575-andebol-category-ids into main
ai-news-writer-ci / test (push) Successful in 1m11s
fix(config): BIT-25575 correct andebol.net WP category IDs + add live site config

Paperclip-Task-Id: BIT-25575
2026-06-18 17:42:18 +01:00
Xika 0818dfd0d4 feat(config): BIT-25575 add andebol.net live site config
ai-news-writer-ci / test (pull_request) Successful in 1m12s
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
2026-06-18 16:40:53 +00:00
Xika 451cd5afba fix(config): BIT-25575 correct andebol.net category IDs to match live WP
ai-news-writer-ci / test (pull_request) Successful in 1m13s
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
2026-06-18 16:38:05 +00:00
spark 22263b933e Merge pull request 'feat(publisher): BIT-25574 category inference + WP resolver + backfill tool' (#25) from task/BIT-25574-category-fix into main
ai-news-writer-ci / test (push) Successful in 1m12s
2026-06-18 17:33:35 +01:00
Xika 1c06da628a fix(deps): BIT-25575 pin undici to ^7.28.0 for Node 20 compatibility
ai-news-writer-ci / test (pull_request) Successful in 1m16s
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
2026-06-18 16:29:19 +00:00
Xika 900cb53f31 fix(publisher): BIT-25575 remove unused import in article-meta.test.js (lint)
ai-news-writer-ci / test (pull_request) Failing after 1m4s
Paperclip-Task-Id: BIT-25575
2026-06-18 16:25:28 +00:00
Xika c8aa487ff9 fix(deps): BIT-25575 pin form-data and undici overrides to fix npm audit high vulns
ai-news-writer-ci / test (pull_request) Failing after 35s
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
2026-06-18 16:24:36 +00:00
Xika 547498ab41 test(publisher): BIT-25574 add wp-categories unit tests for mappedCategoryId
ai-news-writer-ci / test (pull_request) Failing after 29s
Covers slug lookup, missing/null map, non-positive IDs, and case-folding.
2026-06-18 16:22:35 +00:00
XikaandCursor 3027361259 feat(publisher): BIT-25574 sanitize tags and SEO meta from on-page text
ai-news-writer-ci / test (pull_request) Failing after 33s
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]>
2026-06-18 16:13:41 +00:00
Xika 478d82b070 feat(publisher): BIT-25574 category inference + WP resolver + backfill tool
ai-news-writer-ci / test (pull_request) Failing after 34s
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)
2026-06-18 16:10:57 +00:00
spark 4e6875639b Merge pull request 'fix(deploy): remove premature Prometheus check from verify-deploy (BIT-22325)' (#24) from task/BIT-21924-staging-smoke-seed into main
ai-news-writer-ci / test (push) Successful in 30s
fix(deploy): remove premature Prometheus check from verify-deploy (BIT-22325)

Paperclip-Issue: BIT-22325
Paperclip-Agent: tiago-neves
2026-05-14 19:41:43 +01:00
Xika eb0dd1353c fix(deploy): remove premature Prometheus metrics check from verify-deploy (BIT-22325)
ai-news-writer-ci / test (pull_request) Successful in 31s
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
2026-05-14 18:40:51 +00:00
spark 3e852a022d Merge pull request 'fix(ci): git reset --hard for staging deploy; fix rollback (BIT-22325)' (#23) from task/BIT-21924-staging-smoke-seed into main
ai-news-writer-ci / test (push) Successful in 31s
fix(ci): git reset --hard for staging deploy; fix rollback (BIT-22325)

Paperclip-Issue: BIT-22325
Paperclip-Agent: tiago-neves
2026-05-14 19:38:42 +01:00
Xika f9f5c1e2b8 fix(ci): use git reset --hard for staging deploy; fix rollback to avoid pushing reverts (BIT-22325)
ai-news-writer-ci / test (pull_request) Successful in 33s
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
2026-05-14 18:34:25 +00:00
spark 5b5562a06c Merge pull request 'BIT-21924: staging verification smoke seed + /api/ui/articles' (#22) from task/BIT-21924-staging-smoke-seed into main
ai-news-writer-ci / test (push) Successful in 38s
2026-05-13 06:01:58 +01:00
Xika 65fa4014d0 fix(lint): drop missing import/no-extraneous-dependencies rule disable
ai-news-writer-ci / test (pull_request) Successful in 36s
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
2026-05-13 04:36:09 +00:00
Xika 492ab8f678 Align BIT-21924 smoke seed with verification AC paths
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
2026-05-12 15:41:43 +00:00
Xika ec203917d1 Restore /api/ui/articles and add staging verification smoke seed
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
2026-05-12 13:04:59 +00:00
spark 4175fe5b5c Merge pull request 'fix(ci): drop lint from staging deploy; fix revert for merge commits (BIT-21923)' (#21) from fix/BIT-21923-deploy-staging-lint into main
ai-news-writer-ci / test (push) Successful in 55s
fix(ci): drop lint from staging deploy; fix revert for merge commits (BIT-21923)
2026-05-12 13:24:51 +01:00
Xika 6fe72a304b fix(ci): drop lint from staging deploy; fix revert for merge commits (BIT-21923)
ai-news-writer-ci / test (pull_request) Successful in 1m1s
- 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.
2026-05-12 12:18:19 +00:00
spark 4151c1da52 Merge pull request 'ci(staging): deploy after CI on main; pull triggering branch (BIT-21911)' (#20) from task/BIT-21911-staging-deploy-follow-ci-branch into main
ai-news-writer-ci / test (push) Successful in 31s
Merge pull request 'ci(staging): deploy after CI on main; pull triggering branch (BIT-21911)' (#20) from task/BIT-21911-staging-deploy-follow-ci-branch into main
2026-05-12 13:10:43 +01:00
XikaandCursor ca8bec5ca3 ci(staging): deploy after CI on main; pull triggering branch (BIT-21911)
ai-news-writer-ci / test (pull_request) Successful in 32s
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]>
2026-05-12 12:05:48 +00:00
spark 18f28f72dc Merge pull request 'feat(observability): BIT-21258 — Promtail sidecar for Loki log shipping' (#19) from task/BIT-21258-promtail-sidecar into main
ai-news-writer-ci / test (push) Successful in 33s
2026-05-12 12:33:51 +01:00
spark d31b50b846 Merge pull request 'BIT-3602: orchestrator for multi-source fact verification' (#18) from task/BIT-3602-multi-source-fact-verification into main
ai-news-writer-ci / test (push) Successful in 50s
2026-05-12 11:51:00 +01:00
XikaandCursor 2a68c1f3b2 fix(lint): align verification-report.js with ESLint (BIT-21863)
ai-news-writer-ci / test (pull_request) Successful in 51s
Apply eslint --fix indentation for chained calls and replace loose
equality for confidence display with explicit null/undefined checks.

Refs: BIT-3602, BIT-21863
Co-authored-by: Cursor <[email protected]>
2026-05-12 10:49:40 +00:00
Xika e77fc46a70 BIT-3602: Persist verification_report and editorial verification column
ai-news-writer-ci / test (pull_request) Failing after 17s
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
2026-05-12 03:55:01 +00:00
Xika 7bec3ed03f feat(research): BIT-3602 wire orchestrator for multi-source fact verification
ai-news-writer-ci / test (pull_request) Successful in 38s
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
2026-05-12 03:47:05 +00:00
Paperclip Agent a6965c3321 feat(observability): BIT-21258 — Promtail sidecar config and install script
ai-news-writer-ci / test (pull_request) Successful in 35s
Add tools/observability/promtail-config.yml (Promtail sidecar for CT 223,
tails logs/combined.log + logs/error.log, pushes to Loki on CT 224:3100,
serves Prometheus metrics on :9080) and install-promtail-sidecar.sh for
one-step deployment on the LXC.

Paperclip-Issue: BIT-21258
Paperclip-Run: a5947bea-742f-4322-ba54-ec14c7e83548
Paperclip-Agent: Tiago Neves (urlKey tiago-neves; id 5d084b36-f38f-42a5-a92a-520005afda4f)
2026-05-09 18:58:58 +00:00
spark 6b870417fe Merge pull request 'BIT-3603: WCAG 2.1 AA accessibility compliance for AI News Writer' (#16) from task/BIT-4294-from-main into main
ai-news-writer-ci / test (push) Successful in 1m9s
2026-05-09 17:39:57 +01:00