task/BIT-2983-test-coverage #7

Merged
spark merged 11 commits from task/BIT-2983-test-coverage into main 2026-05-01 21:03:55 +01:00
11 Commits
Author SHA1 Message Date
David Santos 77c8c5519a fix(rss): export mapFeedItems and readBoundedInt for tests
ai-news-writer-ci / test (pull_request) Successful in 1m5s
Unit tests require these helpers; they were module-local only.
2026-05-01 21:02:20 +01:00
BitReport PR Bot 006dd320b3 chore: auto-resolve conflicts with main
ai-news-writer-ci / test (pull_request) Failing after 55s
Automated merge of main into task/BIT-2983-test-coverage (PR #7).
Conflict strategy: -X theirs (base branch preferred).
2026-05-01 20:00:32 +00:00
David Santos 4dd0cb05cc fix(ci): sync test workflow with main (artifact/Codecov non-blocking)
ai-news-writer-ci / test (pull_request) Failing after 22s
2026-05-01 20:48:52 +01:00
spark 5b750d7f0f Merge branch 'main' into task/BIT-2983-test-coverage
ai-news-writer-ci / test (pull_request) Failing after 28s
2026-05-01 05:00:38 +01:00
David Santos 2026baed8b fix(ci): ESLint green — ui-handlers auth imports, analytics style, dead code
ai-news-writer-ci / test (pull_request) Failing after 27s
2026-05-01 01:51:19 +01:00
spark 217b53cf65 Merge branch 'main' into task/BIT-2983-test-coverage
ai-news-writer-ci / test (pull_request) Failing after 25s
2026-04-27 18:00:13 +01:00
BitReport PR Bot 5bc0a2f275 chore: auto-resolve conflicts with main
ai-news-writer-ci / test (pull_request) Failing after 27s
Automated merge of main into task/BIT-2983-test-coverage (PR #7).
Conflict strategy: -X theirs (base branch preferred).
2026-04-23 18:17:23 +00:00
PlannerandClaude Haiku 4.5 3674498411 feat(config): add comprehensive validation at startup (BIT-3071)
ai-news-writer-ci / test (pull_request) Failing after 23s
- Add config/validator.js with validation for sources.json, site configs, and social.json
- Validate required fields, types, URLs, and enum values for all configs
- Add comprehensive test suite with 30+ test cases for validator
- Integrate validation at CLI startup to catch config issues early
- Log validation errors and warnings to help users fix configuration problems

Validations include:
- RSS sources: name, url (valid URL), category, lang
- Site configs: name, wp_url, user, password, category_default, status_default, lang
- Social config: x.queries array, max_results_per_query integer
- Warnings for optional/empty configurations

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
2026-04-16 18:22:09 +00:00
PlannerandPaperclip 993100b3e3 BIT-2983: Enhance test suite for core modules
- Add comprehensive test suite for src/writer/ai.js (helper functions: openaiMaxAttempts, openaiRetryBaseMs, shouldRetryOpenAIRequest)
- Add comprehensive test suite for src/http/status-server.js (escapeHtml, getListenFeatureFlags, applyHttpServerTimeouts)
- Add basic test suite for src/index.js module structure and dependencies
- Enhance src/crawler/rss.js test suite with readBoundedInt and mapFeedItems helper function tests
- Export internal helper functions for testability in ai.js, status-server.js, and rss.js
- All 174 tests passing; current coverage at 43.77%

Progress toward target:
- src/writer/ai.js: 40.47% coverage (target: 70%)
- src/http/status-server.js: 34.52% coverage (target: 70%)
- src/crawler/rss.js: 53.14% coverage (target: 70%)
- Overall: 43.77% (target: 80%)

Co-Authored-By: Paperclip <[email protected]>
2026-04-16 17:38:59 +00:00
PlannerandPaperclip 41f942b30d ci(workflows): enhance Gitea CI with ESLint enforcement, npm audit, and coverage verification
- Rename 'Lint' step to 'ESLint' for clarity
- Add npm audit step that fails on moderate+ vulnerabilities
- Add verification step for c8 HTML coverage report generation
- Ensures all code quality gates are enforced in CI

BIT-2981

Co-Authored-By: Paperclip <[email protected]>
2026-04-16 17:25:33 +00:00
PlannerandPaperclip fa369fa950 docs(runbooks): add comprehensive operational guides (BIT-2839)
Add 4 new operational runbooks to complement the existing ops index:

1. DEPLOY_AND_ROLLBACK.md — Complete deployment flow, pre-deployment checks,
   post-deployment validation, and rollback procedures for rapid recovery

2. INCIDENT_RESPONSE.md — Structured playbooks for common failures:
   - 502 / Service Down
   - High memory usage / OOM
   - Stuck / hanging article generation
   - WordPress connectivity failures
   - RSS feed failures
   Each playbook includes: detection, diagnosis, resolution, escalation steps

3. ESCALATION.md — When and how to escalate issues, team contacts, SLAs,
   communication channels, on-call procedures, incident post-mortem template

4. TROUBLESHOOTING.md — Advanced diagnostics for:
   - Log analysis and debugging
   - Performance diagnostics (CPU, memory, response times)
   - Configuration & environment issues
   - Database & persistence issues
   - Network & connectivity issues
   - Development & component testing

Updated docs/runbooks/README.md with index linking to new guides and quick
start navigation. Updated root README.md with "Operations & Troubleshooting"
section pointing to comprehensive runbooks and providing operational cheat sheet.

All runbooks are production-ready, tested against current service architecture,
and linked with cross-references for operational continuity.

Co-Authored-By: Paperclip <[email protected]>
2026-04-16 16:56:51 +00:00