Correct two justifications

Drop the coverage-gate CHANGELOG entry: it is dev infrastructure, invisible
to anyone upgrading. Broaden the check_source_accessible entry to the cases
it now covers.

The nameless-attachment guard reads an empty /F out of untrusted PDF bytes,
so it is boundary validation, not a formality; only the reason it goes
uncovered belongs in the pragma.
This commit is contained in:
Yiorgis Gozadinos 2026-07-27 12:17:39 +03:00
parent a602e0fbf5
commit 5200b71e2b
No known key found for this signature in database
2 changed files with 5 additions and 6 deletions

View file

@ -1,14 +1,10 @@
# Changelog
## [Unreleased]
### Changed
- Test coverage is enforced at 100% via `fail_under` in `[tool.coverage.report]`.
### Fixed
- `Store.set_haiku_version` stamps the store's own config into a recreated settings row instead of the process-global `Config`.
- `check_source_accessible` returns `False` for a URI that fails to parse instead of raising `ValueError`.
- `check_source_accessible` returns `False` for a URI it cannot resolve (unparseable host, unreadable path) instead of raising and aborting a full rebuild.
### Removed

View file

@ -570,7 +570,10 @@ def _extract_pdf_attachments(
for i in range(attachment_count):
att = pdf.get_attachment(i)
name = att.get_name()
if not name: # pragma: no cover - pypdfium2 always names them
# A malformed PDF can carry an attachment with an empty /F, so
# this is real validation on untrusted input — it just needs a
# hand-crafted file to reach, which no fixture here produces.
if not name: # pragma: no cover - needs a malformed PDF
continue
data = bytes(att.get_data())
child_uri = f"{parent_uri}#attachment={quote(name, safe='')}"