Skip to content

fix: EPSS source precision, reconciling stats totals, known-issues fetch for migrated KB pages#18

Merged
jonnybottles merged 1 commit into
mainfrom
fix/data-quality-improvements
Jul 14, 2026
Merged

fix: EPSS source precision, reconciling stats totals, known-issues fetch for migrated KB pages#18
jonnybottles merged 1 commit into
mainfrom
fix/data-quality-improvements

Conversation

@jonnybottles

Copy link
Copy Markdown
Owner

What

Three server data-quality fixes:

  1. EPSS values rounded to source precision. FIRST.org publishes EPSS scores/percentiles as 5-decimal strings; we now round once at parse time so no output view (JSON, CSV, markdown, min_epss filtering) can ever surface float-repr artifacts like 0.016540000000000003.

  2. include_stats breakdowns now reconcile. Entries that ship without a severity rating or impact category (e.g. Chromium CVEs) were invisible in by_severity/by_impact, so bucket counts didn't sum to total and every consumer had to guess why. They now get explicit Unrated/Unspecified buckets — only emitted when non-zero, so fully-rated months are byte-identical to before. Opt-in output only; the default JSON shape is unchanged.

  3. Known-issues retrieval works again for migrated KB pages. support.microsoft.com moved KB articles to /servicing/os/... canonical URLs, which added a second redirect hop (/help/{kb}/topic/.../servicing/...) and a new markup generation (<details>/<summary> issue blocks with <strong> labels under an <h3> heading). The old code followed exactly one hop, so lookups like KB5094123 degraded to unavailable. Now: a bounded, per-hop-validated redirect chain (MAX_REDIRECT_HOPS = 3, same-host https only, never auto-followed) and both markup generations parsed. The honest three-way status contract (published / none_published / unavailable) is unchanged, and fetch failures are still never cached.

Verification

  • Offline suite: 296 passed; coverage 95% (gate ≥ 90); ruff clean
  • pytest --run-live: 307 passed — including the known-issues drift canary against the real support site; KB5094123 now returns published with 3 structured issues end-to-end

🤖 Generated with Claude Code

…KB known-issues retrieval

- Round EPSS score/percentile to the source's 5-decimal precision once at
  parse time so no output view can surface float-repr artifacts.
- Add explicit Unrated / Unspecified buckets to the include_stats severity
  and impact breakdowns so bucket counts always sum to the reported total
  (entries like Chromium CVEs ship without a severity rating).
- Known-issues fetch: support.microsoft.com moved KB articles to
  /servicing/os/... pages, adding a second redirect hop and a new markup
  generation (details/summary blocks, strong labels under an h3 heading).
  Follow a bounded, validated redirect chain (MAX_REDIRECT_HOPS = 3) and
  parse both markup generations; the honest three-way status contract
  (published / none_published / unavailable) is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jonnybottles
jonnybottles merged commit 335956e into main Jul 14, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant