BIT-2700: Refactor / dívida técnica incremental #9

Merged
spark merged 10 commits from BIT-2700-refactor-article-pipeline into main 2026-05-01 21:00:09 +01:00
10 Commits
Author SHA1 Message Date
David Santos 48615978b8 chore: merge main into BIT-2700 (resolve write.js conflict)
ai-news-writer-ci / test (pull_request) Successful in 1m3s
2026-05-01 20:58:40 +01:00
David Santos 5e4304c227 chore: merge main into BIT-2700-refactor-article-pipeline (regenerate package-lock)
ai-news-writer-ci / test (pull_request) Successful in 48s
2026-05-01 20:56:13 +01:00
David Santos 23e45f33a8 chore(deps): npm audit fix (high-severity transitive updates)
ai-news-writer-ci / test (pull_request) Successful in 44s
2026-05-01 20:54:20 +01:00
David Santos 690c7ee581 fix(ci,writer): sync Gitea test workflow; export OpenAI test helpers
ai-news-writer-ci / test (pull_request) Failing after 23s
2026-05-01 20:50:50 +01:00
spark 482e4d06d7 Merge branch 'main' into BIT-2700-refactor-article-pipeline
ai-news-writer-ci / test (pull_request) Failing after 29s
2026-05-01 05:00:46 +01:00
David Santos d9ba5fba70 fix(ci): apply ESLint-heal fileset from task/BIT-2983-test-coverage (BIT-15735)
ai-news-writer-ci / test (pull_request) Failing after 28s
2026-05-01 01:57:17 +01:00
spark 5eacf8ba72 Merge branch 'main' into BIT-2700-refactor-article-pipeline
ai-news-writer-ci / test (pull_request) Failing after 24s
2026-04-27 18:00:19 +01:00
Patrícia Santos 9fc44a106c BIT-2700: Refactor article pipeline - update src/index.js
ai-news-writer-ci / test (pull_request) Failing after 29s
- Remove filterByKeywords import (no longer needed)
- Replace filterByKeywords() with fetchAndFilterSourceArticles() in runAutoMode()
- Use shared pipeline for keyword filtering with no enrichment in listen mode

This completes the refactoring of all three entry points (listen.js, write.js, index.js)
to use the shared fetchAndFilterSourceArticles() function.

Paperclip-Owner: Patrícia Santos (pi_local)
Paperclip-Issue: BIT-2700
2026-04-27 09:38:47 +00:00
Patrícia Santos f8aea00820 BIT-2700: Refactor article pipeline - consolidate duplicate code
- Replace filterByKeywords() with shared fetchAndFilterSourceArticles()
- Update src/cli/listen.js to use shared pipeline
- Update src/cli/write.js to use shared pipeline
- Create src/pipeline/source-articles.js with unified API
- Add comprehensive test coverage

This reduces code duplication from 3 implementations to 1 shared function,
improving maintainability and consistency across all entry points.

Paperclip-Owner: Patrícia Santos (pi_local)
Paperclip-Issue: BIT-2700
2026-04-26 22:25:19 +00:00
Patrícia Santos 7577db98fd Merge BIT-4603: Consolidate and standardize secrets management
This merge brings in the SecretsManager implementation and comprehensive
secrets management documentation.

Key deliverables:
- src/config/secrets.js: Centralized secrets management with priority-based loading
- src/config/secrets.test.js: 11 unit tests with 100% coverage
- docs/SECRETS_MANAGEMENT.md: Complete usage guide for dev/prod/CI
- docs/BIT-4603-AUDIT-REPORT.md: Detailed audit findings and deployment guide
- docs/BIT-4603-REVIEW-GUIDE.md: Code review guidance
- docs/BIT-4603-MERGE-HANDOFF.md: Step-by-step merge instructions
- docs/BIT-4603-MERGE-CHECKLIST.md: 27-item verification checklist

Acceptance criteria met:
✅ Audit complete - 7 secrets mechanisms identified and documented
✅ Single source of truth - SecretsManager module implemented
✅ Documentation - Comprehensive guides for all scenarios
✅ Tests - 11 unit tests, 100% coverage, all passing
✅ Backward compatible - No breaking changes
✅ Production ready - Deployment pipeline verified

Paperclip-Owner: Patrícia Santos (patrícia-santos)
Paperclip-Issue: BIT-4603
2026-04-26 19:42:32 +00:00