Skip to content

feat: PDF ingestion, product domain routing, PyPI release prep (orc-ai 0.2.0)#7

Merged
Thormatt merged 5 commits into
mainfrom
feat/review-followups
Jun 12, 2026
Merged

feat: PDF ingestion, product domain routing, PyPI release prep (orc-ai 0.2.0)#7
Thormatt merged 5 commits into
mainfrom
feat/review-followups

Conversation

@Thormatt

Copy link
Copy Markdown
Owner

Re-opened replacement for #6 (auto-closed when its base branch was deleted after #5 merged). Same content, rebased onto main. See #6 for full description and review history.

🤖 Generated with Claude Code

Thormatt and others added 5 commits June 11, 2026 22:36
The #1 product gap from the review: the target users' corpora (credit
memos, clinical summaries, contracts) are PDFs, and ingest rejected
them outright.

orc ingest now accepts .pdf files and application/pdf URLs: per-page
text extraction with pypdf, pages joined with blank lines, PDF
metadata /Title preferred over the heading-scan fallback. Owner-
password-locked PDFs with an empty user password (common for
distributed contracts) open via decrypt(""); truly password-protected,
unparseable, and scanned/image-only PDFs are refused loudly — silently
ingesting an empty corpus would produce confident not_found verdicts
downstream. pypdf internals never leak; callers see ValueError.

All existing URL guards (SSRF pinning, redirect re-validation, size
limit) sit in front of the PDF branch unchanged. The request
User-Agent now derives from orc.__version__ instead of a hardcoded
stale string.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
domain= previously only accepted HaluBench dataset names (covidQA,
halueval, DROP, ...) — benchmark artifacts promoted to the product
API. No legal team has a claim from domain "halueval".

DOMAIN_TO_MODE is now the product map: general/legal -> evidence,
clinical/biomedical -> binary, financial -> arithmetic, numeric ->
binary, each annotated with the benchmark family it generalizes
(legal honestly marked as having no benchmark evidence yet). The six
HaluBench source names moved unchanged to BENCHMARK_SOURCE_TO_MODE
and still route as aliases, so published F1 numbers stay reproducible
— the benchmark now imports that map directly and cannot drift when
product domains evolve. CLI/MCP help and the verify_claim docstring
teach the product domains instead of dataset names.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The PyPI name "orc" is taken by an unrelated project; the
distribution becomes orc-ai while the import package and CLI command
stay orc. Version 0.2.0 covers the review-hardening fixes plus PDF
ingestion and product domain routing (see CHANGELOG).

Adds minimal CI (pytest + ruff on a 3.11-3.13 matrix) and a
tag-triggered release workflow using PyPI Trusted Publishing — no
token stored; the one-time publisher setup is documented in the
workflow header. The release job refuses to publish when the tag
doesn't match the pyproject version and runs the suite before
building. README project-status section now attributes features to
the right versions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Found live: a claim-dense draft hit extract_claims' 1024-token cap,
the forced tool call came back cut off (stop_reason=max_tokens), and
the partial input parsed as zero claims — so verify --file reported
"No claims extracted" and the caller's gate passed vacuously.

Truncation now escalates the budget (1024 -> 4096 -> 16384), each
attempt is recorded in the trace with its stop_reason and a truncated
flag, and extraction that still truncates at the ceiling raises
rather than returning a partial claim list that would let unextracted
claims bypass verification silently.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Thormatt Thormatt merged commit 7c8356d into main Jun 12, 2026
3 checks passed
@Thormatt Thormatt deleted the feat/review-followups branch June 12, 2026 15:42
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