Day manifest
A day’s commit: the files it names are the day, and what it does not cover is stated
Key manifests/{exchange}/{yyyy-MM-dd}/day.json
Status ok or partial
Publication rules
Gaps
Reasons book_unsynced, connector_disconnected, source_before_genesis, below_schema_floor, decode_error, sequencer_time_regression, source_before_anchor, unknown_instrument, source_purged, source_diverged
Publication, failures and gaps
Hour manifests use snake_case keys: status, exchange, from, to,
partitioner_version, lookback_ns, max_open_writers, dictionary, refdata_anchor,
decoder_versions, inputs, files, gaps, failure, contract_version, publisher_build. All intervals are half-open epoch ns.
Each file states key,family,symbol,rows,bytes,sha256,header_bytes; hashes cover the complete
compressed bytes, and a manifest lists its files in key order. The dictionary and source inputs
have key,sha256 identities.
A source input is the copy of a retained segment that a majority of the cluster’s members
attest. It is usually under the shared streams/ key, but when the shared copy is the minority
it is an agreeing member’s preserved nodes/{m}/diverged/ copy.
Dictionary objects are gzip JSON. contract_version is 2.4.0 in every manifest this
publisher writes; an hour committed before its upgrade keeps the version it was written with.
Readers tolerate unknown additive fields and families but refuse any other major version, and a
manifest without contract_version. partitioner_version is a deliberate algorithm revision (14), independent of
publisher_build, which records the application build. Revision 9 shares the topology rules
between checkpoint compaction and gap tracking, and scopes publisher replacement to the app
and exchange ID even when several IDs map to the same venue name. Existing hours require an
explicit --force repair to update their gap metadata. Revision 11 reads the majority copy
of each source segment instead of failing on any disagreement between members. Revision 12
writes the three readout families, and revision 13 incremental_book_L2, so the same source
hour yields more files than it did before each; hours committed earlier gain them only through
a --force repair. Revision 14 keeps each instrument’s terms in the dictionary and writes them
to the instruments file; it begins on a fresh destination.
A terminal failed manifest has no files and has failure.reason, offending_position
and at (the deterministic window-end timestamp, not processing wall time). Reasons include
below_schema_floor, decode_error, sequencer_time_regression, source_purged and
source_diverged. sequencer_time_regression means consensus time stepped backwards inside
the hour’s read range: rows are partitioned by that time, so the hour is refused rather than
guessed. source_diverged means the members hold different copies of a covering source segment and
no copy has, or can still gain, a majority of them. A minority copy, such as the one a
rolling upgrade of the event codec leaves behind, never fails an hour. --force
can repair a decode failure after a compatible build is installed, or divergence after
the members’ copies are reconciled. Purged data cannot be reconstructed without an external
verified copy. From revision 8, a forced repair refused by terminal source checks preserves
any existing hour commit; revision 10 extends that protection to schema-floor and decoder
refusals. The attempt still reports failure. Without an existing commit,
a failed manifest records the unavailable coverage. Source holes and transient I/O publish
no replacement and retry later.
Additive marketdata schema versions retain every published family’s projection;
unknown templates are skipped and counted in a per-hour warning. The schema floor and
fixed/variable payload bounds remain enforced. Revision 5 replaces the earlier strict
version/template refusal; existing failed hours require --force to rebuild.
Revision 6 also accepts appended sequencer-envelope fields while preserving the original
required context prefix and reading payloads at the envelope’s declared block boundary.
A gap is {family,symbol,from,to,reason}. * means every family/symbol. book_unsynced
is written once for each book family, book_snapshot_25 and incremental_book_L2, with the
same bounds, and affects no other family: from its start until the next whole-book group of
incremental_book_L2 the book is unknown (where the book holds). connector_disconnected conservatively affects all symbols
and families of that exchange when a recorded active shard/endpoint group has no LIVE or
DEGRADED connection. The readout families have no gap reason of their own: only a gap whose
family is * covers them, connector_disconnected among them. Explicit SHUTDOWN retires a seat; a new publisher instance replaces
that publisher’s prior seats. Quiet time alone never retires a transition-only status.
The replacement rule requires the connector’s tested ACTIVE_PASSIVE mode: one publishing
instance per app and exchange ID. Unknown connection states count as down; unknown reasons
never imply shutdown. Connection history is carried with the dictionary. Pre-genesis hours are empty ok
hours with a full-window source_before_genesis gap; a partially covered opening hour
has that gap only before genesis. Snapshot bootstrap instead uses source_before_anchor.
Unknown pre-anchor connection state cannot be inferred from a refdata snapshot.
unknown_instrument uses symbol instrument_id:<id> and spans the skipped fact times.
A purged book lookback alone does not fail an otherwise retained hour. Reading starts at
the retained head; books without a surviving restatement remain book_unsynced from the
hour start until their first valid restatement. For an instrument first listed during the hour,
the initial book gap starts at its listing time. Retained trades and quotes still publish.
Every gap stays inside its hour; no lost-lookback gap is attributed to a previous hour.
Loss of any requested in-hour source remains a terminal failure.
Day manifests are ok if all 24 hours are ok, otherwise partial. They retain the
hour-manifest identities, every gap, and failed_hours with full-hour gaps, so failures
remain visible after hourly data expires. hour_contents records semantic hashes of
files, status, failures and gaps; metadata-only changes refresh provenance without
rebuilding data. The day’s instrument CSV identity is also checked. instruments_dictionary pins the source
dictionary identity so an unchanged image reuses the CSV without downloading it again, where the previous close is
of the same contract_version: a close never names a file an earlier contract rendered. superseded_objects
lists directly replaced day data/index/instrument identities as cleanup candidates, not
permission to delete them: other manifests or pinned readers may still reference them.
parts_index names a hash-verified, compressed
JSON side index of byte ranges and hourly file identities, allowing repairs to recover
unchanged hours from the previous immutable day; it is the only repair index, and lists its
parts by day_key, then hour_key. instruments identifies the day’s CSV dictionary, containing the
latest pre-day name plus in-day versions, with display_price_scale, display_qty_scale,
valid_from, global_sequence, removed and version, and the
terms each version trades on.
Readers must verify the named SHA-256. Data objects, dictionaries, instruments and side indexes have immutable content-addressed keys. A manifest is the final commit; an interrupted or competing writer leaves the previously committed bytes readable. For a day, compare its recorded hour-manifest hashes with the current hours when requesting the latest repaired view; an older day remains an internally consistent version. A repaired hour commits before its day is closed again, so while the two differ the day is under repair: retry later. A server of days may make that comparison on a bounded interval, which it states, instead of before each day it serves.
Identical inputs, algorithm revision, runtime/compression build, lookback and writer limit
give identical data bytes. A build change is recorded separately even when the algorithm
revision is unchanged. --force rebuilds every selected hour regardless of version.
Hourly lifecycle expiry applies only to hourly/ data; retain manifests, dictionaries,
side indexes and immutable day objects. The application does not garbage-collect obsolete
immutable objects. Equivalent decompressed header text is accepted across gzip encoders.