Implement ESRC-WP-0002/0003/0004: HTML/MD ingest, metadata, recovery
Add ingestHtml and ingestMarkdown with ADR-0003 pageless offset semantics, PDF intrinsic metadata extraction with caller-wins merge (WP-0003), and citation recovery primitives including re-ingest reconcile, local quote search, and pluggable discovery hooks (ADR-0004). Mark all three workplans finished with contract tests (80 passing).
This commit is contained in:
parent
df6acad828
commit
97437dfa18
28 changed files with 1295 additions and 69 deletions
42
tests/fixtures-text.ts
Normal file
42
tests/fixtures-text.ts
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/**
|
||||
* Inline HTML/Markdown fixtures for contract tests (ADR-0003).
|
||||
*
|
||||
* Unlike the PDF corpus (ADR-0002), these are small synthetic documents with
|
||||
* no PII and are owned by this repo.
|
||||
*/
|
||||
|
||||
export interface TextFixture {
|
||||
readonly id: string;
|
||||
readonly knownGoodQuote: string;
|
||||
}
|
||||
|
||||
export const HTML_FIXTURE = `<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Fixture Title</title>
|
||||
<style>.hidden { display: none; }</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello World</h1>
|
||||
<p>Known good quote for HTML ingest testing.</p>
|
||||
<script>alert("removed")</script>
|
||||
</body>
|
||||
</html>`;
|
||||
|
||||
export const MARKDOWN_FIXTURE = `# Hello World
|
||||
|
||||
Known good quote for Markdown ingest testing.
|
||||
|
||||
**bold** and _italic_ text.
|
||||
`;
|
||||
|
||||
export const TEXT_FIXTURES: readonly TextFixture[] = [
|
||||
{
|
||||
id: "html-basic",
|
||||
knownGoodQuote: "Known good quote for HTML ingest testing.",
|
||||
},
|
||||
{
|
||||
id: "markdown-basic",
|
||||
knownGoodQuote: "Known good quote for Markdown ingest testing.",
|
||||
},
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue