Architecture & Testing
Build pipeline
Module breakdown
src/cvelio/cli.py— Argument parsing, interactive prompts (init,enrich,build,show,templates,doctor), parallel variant orchestration, and provenance logging.src/cvelio/profile.py— Profile YAML validation, PDF/text source import (pypdf), and local identity/PII redaction (for_tailoring).src/cvelio/enrich.py— GitHub REST pagination/metadata fetching, Apify LinkedIn profile & post fetching, JSON pruning, batched digestion, and evidence loading.src/cvelio/llm.py— Zero-SDK HTTP clients for Anthropic, Gemini, and OpenRouter with backoff retries and JSON extraction.src/cvelio/tailor.py— Prompts, gap policies, synthetic role-brief generation, JSON normalization, weak-wording enforcement, and resume shortening.src/cvelio/render.py— LaTeX escaping, template rendering, Tectonic compilation, automatic font/margin fit loop, and atomicfcntl.flockversioned publishing.src/cvelio/report.py— Deterministic whole-term matching, unverified-term auditing, Markdown fit reports, and multi-PDF comparison scoring.src/cvelio/history.py— Thread/process-safe JSONL logs for posting analyses (history.jsonl) and build provenance (.cvelio-builds.jsonl), plus token-based role matching.src/cvelio/config.py— User settings (~/.config/cvelio/config.yaml), AWS SSM Parameter Store secret resolution, and GitHub token fallback chain.
Testing & coverage
Run the full test suite (unit, integration, and subprocess E2E with a local HTTP mock provider) and generate an HTML branch-coverage report:
make testRun individual test tiers:
make test TEST_ARGS="-m unit"make test TEST_ARGS="-m integration"make test TEST_ARGS="-m e2e"Tests are organized by module under tests/ (test_cli.py, test_cli_e2e.py, test_config.py, test_enrich.py, test_history.py, test_llm.py, test_profile.py, test_render.py, test_report.py, test_tailor.py) with automatic config cache isolation in tests/conftest.py.