IB-WP-0016-T05: deterministic Lefevre acceptance fixture

Check in a small Lefevre-shaped EPUB fixture as separate source files
under tests/fixtures/lefevre/sources/ (container.xml, OPF, nav, cover,
PG header, three roman-numeral chapters with page anchors,
transcriber notes, license, PG footer). The test helper assembles
these into an EPUB at test time so the inputs stay inspectable in git.

Fixture responses tuned to the trading-literature profile (T04) live
at tests/fixtures/lefevre/responses.yaml: trader / institution /
strategy categories on entities, strategy_outcome / actor_venue
relation types, and all four trading-tuned evaluation criteria.

Three tests cover the acceptance:
- end-to-end Python pipeline: stable chapter-NN source slugs, full
  artifact tree (entities, relations, evaluations, metrics, history,
  generation report), budget registry persisted, chapter_number
  provenance round-trips through artifacts/index.yaml
- regression: PG boilerplate (cover, nav, header, notes, license,
  footer) is excluded by default and only appears under
  include_non_body=True
- CLI smoke through generate from-source --profile trading-literature
  --fixture-responses ...

125 tests pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-17 22:31:17 +02:00
parent bb70b2f4b9
commit 348deca9f2
14 changed files with 430 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>Reminiscences of a Stock Operator (Fixture)</title></head>
<body>
<h2>I</h2>
<p>
<span id="Page_1">1</span>
The narrator takes his first job as a quotation-board boy at a stock
brokerage off the New York Stock Exchange. He is quick with figures
and watches the tape behaviour of stocks like Hollow Tube and Erie,
keeping a small book of hits and misses to test his memory against
the next day's quotations.
</p>
<p>
<span id="Page_2">2</span>
He learns, in the bucket shops that dotted the city in those years,
that anticipating price movements is a craft built on observation of
tape behaviour, not on tips from customers crowded around the
ticker.
</p>
</body>
</html>

View File

@@ -0,0 +1,19 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>Reminiscences of a Stock Operator (Fixture)</title></head>
<body>
<h2>II</h2>
<p>
<span id="Page_15">15</span>
Between the discovery that the Cosmopolitan Stock Brokerage Company is
ready to load the dice and the narrator's discovery of pyramiding, he
sees that even an old bucket-shop hand can be ruined by the wrong
side of a one-sided market.
</p>
<p>
<span id="Page_16">16</span>
The lesson he draws is to test the size of his line against the size
of the float, and to scale in only when each successive purchase is
vindicated by the tape itself.
</p>
</body>
</html>

View File

@@ -0,0 +1,13 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>Reminiscences of a Stock Operator (Fixture)</title></head>
<body>
<h2>III</h2>
<p>
<span id="Page_31">31</span>
The narrator learns, after a loss in a thin market, that there are
no new tricks in Wall Street: every habit of price has appeared in
some earlier era under another name, and the operator who remembers
that pays less tuition than the one who does not.
</p>
</body>
</html>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
<rootfiles>
<rootfile full-path="OEBPS/content.opf" media-type="application/oebps-package+xml"/>
</rootfiles>
</container>

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://www.idpf.org/2007/opf" version="3.0" unique-identifier="bookid">
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:identifier id="bookid">urn:fixture:lefevre</dc:identifier>
<dc:title>Reminiscences of a Stock Operator (Fixture)</dc:title>
<dc:creator>Edwin Lefevre (Fixture)</dc:creator>
<dc:language>en</dc:language>
<dc:rights>Public domain in the USA. Fixture content for infospace-bench tests.</dc:rights>
<dc:subject>Speculation</dc:subject>
<dc:subject>New York Stock Exchange</dc:subject>
<dc:source>https://www.gutenberg.org/ebooks/60979</dc:source>
<meta property="dcterms:modified">2026-05-17T00:00:00Z</meta>
</metadata>
<manifest>
<item id="nav" href="nav.xhtml" media-type="application/xhtml+xml" properties="nav"/>
<item id="cover" href="cover.xhtml" media-type="application/xhtml+xml"/>
<item id="pgheader" href="pgheader.xhtml" media-type="application/xhtml+xml"/>
<item id="ch1" href="chapter1.xhtml" media-type="application/xhtml+xml"/>
<item id="ch2" href="chapter2.xhtml" media-type="application/xhtml+xml"/>
<item id="ch3" href="chapter3.xhtml" media-type="application/xhtml+xml"/>
<item id="notes" href="transcriber-notes.xhtml" media-type="application/xhtml+xml"/>
<item id="license" href="license.xhtml" media-type="application/xhtml+xml"/>
<item id="pgfooter" href="pgfooter.xhtml" media-type="application/xhtml+xml"/>
</manifest>
<spine>
<itemref idref="cover"/>
<itemref idref="nav" linear="no"/>
<itemref idref="pgheader"/>
<itemref idref="ch1"/>
<itemref idref="ch2"/>
<itemref idref="ch3"/>
<itemref idref="notes"/>
<itemref idref="license"/>
<itemref idref="pgfooter"/>
</spine>
</package>

View File

@@ -0,0 +1,4 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>Cover</title></head>
<body><h1>Cover</h1><p>Reminiscences of a Stock Operator (Fixture)</p></body>
</html>

View File

@@ -0,0 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>License</title></head>
<body>
<h2>License</h2>
<p>This fixture is checked into infospace-bench solely for deterministic regression testing.</p>
</body>
</html>

View File

@@ -0,0 +1,12 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en">
<head><title>Contents</title></head>
<body>
<nav epub:type="toc">
<ol>
<li><a href="chapter1.xhtml">I</a></li>
<li><a href="chapter2.xhtml">II</a></li>
<li><a href="chapter3.xhtml">III</a></li>
</ol>
</nav>
</body>
</html>

View File

@@ -0,0 +1,6 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>End</title></head>
<body>
<p>*** END OF THE PROJECT GUTENBERG EBOOK REMINISCENCES OF A STOCK OPERATOR ***</p>
</body>
</html>

View File

@@ -0,0 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>Reminiscences of a Stock Operator (Fixture)</title></head>
<body>
<p>*** START OF THE PROJECT GUTENBERG EBOOK REMINISCENCES OF A STOCK OPERATOR ***</p>
<p>Produced by test fixtures for infospace-bench.</p>
</body>
</html>

View File

@@ -0,0 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>Transcriber's Notes</title></head>
<body>
<h2>Transcriber's Notes</h2>
<p>Minor spelling and punctuation has been normalised in this fixture edition.</p>
</body>
</html>