2026-07-08 20:55:28 +02:00
|
|
|
---
|
|
|
|
|
id: ESRC-WP-0003
|
|
|
|
|
type: workplan
|
|
|
|
|
title: "Document metadata enrichment beyond pass-through options"
|
|
|
|
|
domain: infotech
|
|
|
|
|
repo: evidence-source
|
2026-07-09 01:48:28 +02:00
|
|
|
status: finished
|
2026-07-08 20:55:28 +02:00
|
|
|
owner: codex
|
|
|
|
|
topic_slug: citation_evidence_mvp
|
|
|
|
|
created: "2026-07-08"
|
2026-07-09 01:48:28 +02:00
|
|
|
updated: "2026-07-09"
|
2026-07-08 20:55:28 +02:00
|
|
|
spec_refs:
|
|
|
|
|
- README.md
|
|
|
|
|
- src/pdf/ingest.ts
|
2026-07-09 01:48:28 +02:00
|
|
|
- src/pdf/metadata.ts
|
2026-08-25 20:10:10 +02:00
|
|
|
state_hub_workstream_id: "16444f5e-93f2-5a7f-a2f1-92284315d041"
|
2026-07-08 20:55:28 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# ESRC-WP-0003 — Metadata enrichment
|
|
|
|
|
|
|
|
|
|
Today `ingestPdf` only passes through caller-supplied `title`/`uri`/`metadata`.
|
|
|
|
|
This workplan extracts intrinsic document metadata (PDF info dictionary,
|
|
|
|
|
embedded XMP, page-derived signals like author/creation date/title) and folds
|
|
|
|
|
it into the `Document` record without breaking the pure-over-bytes contract.
|
|
|
|
|
|
|
|
|
|
## Sketch
|
|
|
|
|
|
|
|
|
|
```task
|
|
|
|
|
id: ESRC-WP-0003-T01
|
2026-07-09 01:48:28 +02:00
|
|
|
status: done
|
2026-07-08 20:55:28 +02:00
|
|
|
priority: low
|
2026-08-25 20:10:10 +02:00
|
|
|
state_hub_task_id: "01187f2c-f6fa-549e-91ad-a0acc46bcd36"
|
2026-07-08 20:55:28 +02:00
|
|
|
```
|
|
|
|
|
Enumerate available PDF metadata sources (info dict, XMP) via PDF.js and decide
|
|
|
|
|
precedence vs. caller-supplied options (caller wins).
|
|
|
|
|
|
|
|
|
|
```task
|
|
|
|
|
id: ESRC-WP-0003-T02
|
2026-07-09 01:48:28 +02:00
|
|
|
status: done
|
2026-07-08 20:55:28 +02:00
|
|
|
priority: low
|
2026-08-25 20:10:10 +02:00
|
|
|
state_hub_task_id: "95176499-3ae7-586d-bce4-a96c075632ab"
|
2026-07-08 20:55:28 +02:00
|
|
|
```
|
|
|
|
|
Implement extraction into a normalized metadata shape; keep it optional so
|
|
|
|
|
minimal-metadata PDFs still ingest cleanly.
|
|
|
|
|
|
|
|
|
|
```task
|
|
|
|
|
id: ESRC-WP-0003-T03
|
2026-07-09 01:48:28 +02:00
|
|
|
status: done
|
2026-07-08 20:55:28 +02:00
|
|
|
priority: low
|
2026-08-25 20:10:10 +02:00
|
|
|
state_hub_task_id: "83fa3027-61f7-5bb9-95ce-ffbe58c90ebd"
|
2026-07-08 20:55:28 +02:00
|
|
|
```
|
|
|
|
|
Contract tests over the fixture corpus asserting extracted vs. overridden
|
2026-07-09 01:48:28 +02:00
|
|
|
metadata precedence.
|