generated from coulomb/repo-seed
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:
131
tests/fixtures/lefevre/responses.yaml
vendored
Normal file
131
tests/fixtures/lefevre/responses.yaml
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
responses:
|
||||
- stage_id: summarize-source
|
||||
input_artifact_id: "*"
|
||||
markdown: |
|
||||
# Source Summary
|
||||
|
||||
The chapter follows the narrator's first encounters with quotation
|
||||
boards, the New York Stock Exchange, and the bucket-shop circuit.
|
||||
It establishes tape reading as the craft on which his later trades
|
||||
are built.
|
||||
- stage_id: extract-entities
|
||||
input_artifact_id: "*"
|
||||
markdown: |
|
||||
# Larry Livingston
|
||||
|
||||
## Category
|
||||
|
||||
trader
|
||||
|
||||
## Definition
|
||||
|
||||
The first-person narrator, a young quotation-board boy turning
|
||||
bucket-shop trader, modeled on Jesse Livermore.
|
||||
|
||||
## Context
|
||||
|
||||
Lefevre uses Livingston to dramatize the apprenticeship of a stock
|
||||
operator across the chapter.
|
||||
|
||||
# Bucket Shop
|
||||
|
||||
## Category
|
||||
|
||||
institution
|
||||
|
||||
## Definition
|
||||
|
||||
A 1900s retail brokerage that took the other side of customer tape
|
||||
bets without executing actual exchange orders.
|
||||
|
||||
## Context
|
||||
|
||||
The bucket shop is where the narrator earns and loses his first
|
||||
stakes.
|
||||
|
||||
# Tape Reading
|
||||
|
||||
## Category
|
||||
|
||||
strategy
|
||||
|
||||
## Definition
|
||||
|
||||
Inferring price intent and momentum from the ticker tape rather
|
||||
than from fundamental valuation.
|
||||
|
||||
## Context
|
||||
|
||||
The chapter frames tape reading as a learnable pattern skill, not
|
||||
luck.
|
||||
- stage_id: extract-relations
|
||||
input_artifact_id: "*"
|
||||
markdown: |
|
||||
# Larry Livingston Practices Tape Reading
|
||||
|
||||
## Subject
|
||||
|
||||
Larry Livingston
|
||||
|
||||
## Predicate
|
||||
|
||||
practices
|
||||
|
||||
## Object
|
||||
|
||||
Tape Reading
|
||||
|
||||
## Relation Type
|
||||
|
||||
strategy_outcome
|
||||
|
||||
## Evidence
|
||||
|
||||
The narrator describes long hours reading the tape at the bucket
|
||||
shop and the small book of hits and misses he keeps.
|
||||
|
||||
# Bucket Shop Hosts Larry Livingston
|
||||
|
||||
## Subject
|
||||
|
||||
Bucket Shop
|
||||
|
||||
## Predicate
|
||||
|
||||
hosts
|
||||
|
||||
## Object
|
||||
|
||||
Larry Livingston
|
||||
|
||||
## Relation Type
|
||||
|
||||
actor_venue
|
||||
|
||||
## Evidence
|
||||
|
||||
The narrator's first profits come from trading inside a bucket
|
||||
shop.
|
||||
- stage_id: evaluate-entity
|
||||
input_artifact_id: "*"
|
||||
markdown: |
|
||||
---
|
||||
artifact_id: entity/larry-livingston.md
|
||||
evaluator: fixture
|
||||
evaluated_at: '2026-05-17T00:00:00'
|
||||
scores:
|
||||
- name: groundedness
|
||||
value: 4.0
|
||||
max_value: 5.0
|
||||
- name: lesson_clarity
|
||||
value: 4.0
|
||||
max_value: 5.0
|
||||
- name: historical_context
|
||||
value: 4.0
|
||||
max_value: 5.0
|
||||
- name: overgeneralization_risk
|
||||
value: 4.0
|
||||
max_value: 5.0
|
||||
---
|
||||
|
||||
# Evaluation: entity/larry-livingston.md
|
||||
21
tests/fixtures/lefevre/sources/chapter1.xhtml
vendored
Normal file
21
tests/fixtures/lefevre/sources/chapter1.xhtml
vendored
Normal 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>
|
||||
19
tests/fixtures/lefevre/sources/chapter2.xhtml
vendored
Normal file
19
tests/fixtures/lefevre/sources/chapter2.xhtml
vendored
Normal 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>
|
||||
13
tests/fixtures/lefevre/sources/chapter3.xhtml
vendored
Normal file
13
tests/fixtures/lefevre/sources/chapter3.xhtml
vendored
Normal 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>
|
||||
6
tests/fixtures/lefevre/sources/container.xml
vendored
Normal file
6
tests/fixtures/lefevre/sources/container.xml
vendored
Normal 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>
|
||||
36
tests/fixtures/lefevre/sources/content.opf
vendored
Normal file
36
tests/fixtures/lefevre/sources/content.opf
vendored
Normal 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>
|
||||
4
tests/fixtures/lefevre/sources/cover.xhtml
vendored
Normal file
4
tests/fixtures/lefevre/sources/cover.xhtml
vendored
Normal 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>
|
||||
7
tests/fixtures/lefevre/sources/license.xhtml
vendored
Normal file
7
tests/fixtures/lefevre/sources/license.xhtml
vendored
Normal 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>
|
||||
12
tests/fixtures/lefevre/sources/nav.xhtml
vendored
Normal file
12
tests/fixtures/lefevre/sources/nav.xhtml
vendored
Normal 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>
|
||||
6
tests/fixtures/lefevre/sources/pgfooter.xhtml
vendored
Normal file
6
tests/fixtures/lefevre/sources/pgfooter.xhtml
vendored
Normal 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>
|
||||
7
tests/fixtures/lefevre/sources/pgheader.xhtml
vendored
Normal file
7
tests/fixtures/lefevre/sources/pgheader.xhtml
vendored
Normal 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>
|
||||
7
tests/fixtures/lefevre/sources/transcriber-notes.xhtml
vendored
Normal file
7
tests/fixtures/lefevre/sources/transcriber-notes.xhtml
vendored
Normal 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>
|
||||
Reference in New Issue
Block a user