Skip to content

mostlyright.finance.transcripts.ledger

Append-only transcript + fact parquet ledger.

Two append-only parquet ledgers, one per canonical schema:

TranscriptLedgerschema.finance.transcript.v1 segment rows. FactLedgerschema.finance.fact.v1 counted-mention rows.

Audio is never written. The on-disk parquet schema is derived strictly from the canonical schema’s COLUMNS — text and derived-fact columns only. There is no audio-bytes or audio-path column, and a caller-supplied audio key is dropped rather than persisted, which the test suite asserts structurally. Captured audio is a transient ingest artifact; only the transcript text and the derived facts reach the ledger.

Path layout (honors MOSTLYRIGHT_CACHE_DIR):

<cache-root>/earnings/transcripts/<TICKER>/<CALL_ID>.parquet
<cache-root>/earnings/facts/<TICKER>/<CALL_ID>.parquet

Append semantics: a filelock-guarded read-modify-write merge, as in the CWOP and satellite caches. An append concatenates onto any rows already persisted for (ticker, call_id) and rewrites the partition atomically via .tmp plus os.replace. This ledger is deliberately standalone and does not import the parity-coupled weather/cache.py: it has no current-month-skip or local standard time semantics and must never touch the parity-critical modules.

ClassDescription
FactLedger([root])Append-only schema.finance.fact.v1 counted-mention ledger (no audio).
TranscriptLedger([root])Append-only schema.finance.transcript.v1 segment ledger (no audio).

class mostlyright.finance.transcripts.ledger.FactLedger(root=None)

Section titled “class mostlyright.finance.transcripts.ledger.FactLedger(root=None)”

Bases: _ParquetLedger

Append-only schema.finance.fact.v1 counted-mention ledger (no audio).

  • Parameters: root (Path | str | None)

class mostlyright.finance.transcripts.ledger.TranscriptLedger(root=None)

Section titled “class mostlyright.finance.transcripts.ledger.TranscriptLedger(root=None)”

Bases: _ParquetLedger

Append-only schema.finance.transcript.v1 segment ledger (no audio).

  • Parameters: root (Path | str | None)