Skip to content

fix(backfill): canonical API abstracts for the whole corpus; merge, not override - #80

Merged
aarontrowbridge merged 1 commit into
mainfrom
fix/backfill-abstracts
Oct 8, 2026
Merged

aarontrowbridge merged 1 commit into
mainfrom
fix/backfill-abstracts

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Member

Closes #79.

Found running the production backfill on v0.4.0 (103 library texts resolved to only 50 papers with content, 17 with abstracts):

  • Canonical abstracts: the abstract of record is the arXiv API's, not a PDF extraction's — pypdf usually drops the standalone Abstract heading. backfill stamps the API abstract into the sections cache for every corpus id still lacking one; an idempotent re-run does zero network (verified by test).
  • Merge, not override: corpus_content previously let a library resolution replace the cache entry — a library hit with conclusions but no abstract silently discarded the canonical abstract. Per-field merge now: cache abstract wins, library conclusions win.
  • PDF text stays the conclusions source; the failure floor concept folds into the stamping pass.

Suite + ruff green (3 new tests: whole-corpus stamping, zero-network idempotence, merge precedence).

…ot override

The live backfill exposed it: pypdf text usually drops the standalone
'Abstract' heading (a 12-text sample resolved 1 abstract against 7
conclusions), and corpus_content let a library resolution override the
cached canonical abstract. The abstract of record is the arXiv API's:
backfill stamps it into the sections cache for every corpus id still
lacking one (one batched call — an idempotent re-run does zero network),
and corpus_content now merges per field — the cache's abstract wins,
the library's conclusions win, neither discards the other.

Closes #79
@aarontrowbridge
aarontrowbridge merged commit 5848b83 into main Oct 8, 2026
1 check passed
@aarontrowbridge
aarontrowbridge deleted the fix/backfill-abstracts branch October 8, 2026 10:52
aarontrowbridge added a commit that referenced this pull request Oct 8, 2026
The #80 rename left the CLI printing the old keys — the command completed
its work and then crashed on the report line. The smoke pins the printed
line to the schema backfill_corpus returns, with seams injected so the
CLI path runs hermetically.

Closes #81
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.

fix(backfill): canonical API abstracts for the whole corpus; merge, not override, in content resolution

1 participant