fix(ownership): harden data-page discovery per review

Addresses review on #26:
- strip ?query/#fragment before the .xlsx/.pdf extension check
- skip page entries without a parseable as-of date instead of emitting
  an empty publish_date
- warn on stderr when the data page fails or parses to zero entries
  while announcement results still exist, instead of silently
  degrading to announcement-only results

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017a5Cv5Z1NzdYKgKnTiAF4E
This commit is contained in:
hermes 2026-09-24 21:11:56 +00:00
commit bb39e98fab
2 changed files with 49 additions and 5 deletions

View file

@ -1313,6 +1313,10 @@ fn ownership_discover_supports_above1_family() {
.stdout(predicate::str::contains("Above 1%"))
.stdout(predicate::str::contains(
"20260310_Semua Emiten Saham_Pengumuman Bursa_32052554_lamp1.pdf",
))
.stderr(predicate::str::contains("warning:"))
.stderr(predicate::str::contains(
"IDX share ownership data page discovery",
));
}