feat(publisher): BIT-25574 category inference + WP resolver + backfill tool #25

Merged
spark merged 6 commits from task/BIT-25574-category-fix into main 2026-06-18 17:33:36 +01:00
6 Commits
Author SHA1 Message Date
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