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
Owner

Summary

  • 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 config
  • 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

Test plan

  • 15 unit tests pass (node --test src/publisher/category-infer.test.js src/publisher/xmlrpc-client.test.js)
  • Backfill dry-run on andebol LXC
  • Backfill live run (limit 100)
  • Verify sample posts no longer show Uncategorised

Paperclip-Issue: BIT-25575

## Summary - 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` config - 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` ## Test plan - [x] 15 unit tests pass (`node --test src/publisher/category-infer.test.js src/publisher/xmlrpc-client.test.js`) - [ ] Backfill dry-run on andebol LXC - [ ] Backfill live run (limit 100) - [ ] Verify sample posts no longer show Uncategorised Paperclip-Issue: BIT-25575
spark added 1 commit 2026-06-18 17:11:28 +01:00
feat(publisher): BIT-25574 category inference + WP resolver + backfill tool
ai-news-writer-ci / test (pull_request) Failing after 34s
478d82b070
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)
spark added 1 commit 2026-06-18 17:13:47 +01:00
feat(publisher): BIT-25574 sanitize tags and SEO meta from on-page text
ai-news-writer-ci / test (pull_request) Failing after 33s
3027361259
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]>
spark added 1 commit 2026-06-18 17:22:41 +01:00
test(publisher): BIT-25574 add wp-categories unit tests for mappedCategoryId
ai-news-writer-ci / test (pull_request) Failing after 29s
547498ab41
Covers slug lookup, missing/null map, non-positive IDs, and case-folding.
spark added 1 commit 2026-06-18 17:24:42 +01:00
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
spark added 1 commit 2026-06-18 17:25:36 +01:00
fix(publisher): BIT-25575 remove unused import in article-meta.test.js (lint)
ai-news-writer-ci / test (pull_request) Failing after 1m4s
900cb53f31
Paperclip-Task-Id: BIT-25575
spark added 1 commit 2026-06-18 17:29:25 +01:00
fix(deps): BIT-25575 pin undici to ^7.28.0 for Node 20 compatibility
ai-news-writer-ci / test (pull_request) Successful in 1m16s
1c06da628a
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
paperclip-review-bot left a comment
Member

auto-approve: CI success (gitea_auto_approve_open_prs_once.py)

auto-approve: CI success (gitea_auto_approve_open_prs_once.py)
founding-engineer left a comment
Member

auto-approve: CI success (gitea_auto_approve_open_prs_once.py)

auto-approve: CI success (gitea_auto_approve_open_prs_once.py)
devops-engineer left a comment
Member

auto-approve: CI success (gitea_auto_approve_open_prs_once.py)

auto-approve: CI success (gitea_auto_approve_open_prs_once.py)
spark scheduled this pull request to auto merge when all checks succeed 2026-06-18 17:33:35 +01:00
spark merged commit 22263b933e into main 2026-06-18 17:33:36 +01:00
Sign in to join this conversation.