Skip to main content

Module github_history

Module github_history 

Source
Expand description

Byte-exact aliases600 retrieval and evidence envelope from the frozen Python format.

Structs§

HistoryCounts
Counts that the transcript header reports; they fix the header’s length and so every code point position after it.
HistoryEvidence
HistoryPairSpec
One item’s transcript view of a session: its cutoff, the item it is about, and where its rendered text goes.
HistoryResult
One item’s windows with their recovered text.
HistoryScanner
Single-pass form of the frozen retrieval: the transcript is pushed in pieces and only the last few hundred code points and a small record per window that has a hit are kept. Positions are code point indexes, as in the Python original.
RowMeta
What the first pass needs from each row. SQLite’s json_extract yields these cheaply, without decoding the whole body.
Selected
A window chosen for the evidence, before its text is recovered.
SessionHistory
Renders one session’s rows for several items at once. Rows are read twice, in the same snapshot: count_row over all of them fixes each header, then row over them in (position, stable_id) order renders each exactly once and hands it to every pair that includes it. The rendered text is byte-identical to the whole-string rendering of the frozen format; it is never held whole. complete then renders again, once, only the rows around the windows the sinks selected.
Snippet
Span

Enums§

OrderedValue
Local ordered JSON, so the Python format never changes global serde_json features.

Traits§

HistorySink
A sink that ends in a selection of windows once the whole transcript has been pushed.
RowFetch
Gives back the stored rows the passes saw.
TextSink
Receives rendered transcript text piece by piece.

Functions§

history_scanner
A scanner for one item against one session. base must already be bounded and redacted once; the original item’s full body is used only for retrieval. None when the item has no searchable identifiers, which gives empty history.
redact
retrieve
Retrieves from a complete transcript text. Original title/body must be supplied, independently of the bounded classifier item.
student_segments
Training-format segments, item first, with history last in the session. Evidence is already bounded/redacted; serialization never bounds it again.