ledgr stores several hashes and JSON payloads so runs, sweeps, promotion records, and walk-forward artifacts can say what executed without confusing runtime lookup details with concrete feature identity.
Run and config identity
config_hash identifies the execution config after removing store-local
paths, run-local IDs, and diagnostic declaration-order fields. It remains
sensitive to execution inputs such as snapshot identity, universe, strategy,
parameters, feature definitions, timing model, cost identity, opening state,
and seed.
feature_set_hash identifies the resolved concrete feature definitions by
hashing the set of feature fingerprints. It changes when concrete feature
parameters change, even if user-facing aliases stay the same.
feature_params_hash identifies the feature parameter list supplied to a
run or candidate. It records user parameter inputs; feature_set_hash
records the resolved feature definitions produced from those inputs.
Alias identity
alias_map_json stores the active alias map used for runtime lookup, plus
declaration-level identity mappings when available. The concrete lookup map
lets ctx$features(id) resolve aliases to feature IDs after reopening.
alias_map_hash hashes declaration-level alias identity, not concrete
feature parameter values. Alias names and declaration semantics affect this
hash; resolved feature parameter values belong to feature_set_hash.
alias_map_order records declaration order for diagnostics and display. It
is not part of config_hash.
Cost identity
cost_plan_json is the canonical serializable cost-model plan stored in the
execution config. cost_model_hash is the SHA-256 hash of that plan. These
fields are execution identity for runs and sweep candidates. Walk-forward
candidate and session identity also include cost_model_hash.
Target-risk identity
risk_plan_json is the canonical serializable target-risk plan stored in the
execution config. risk_chain_hash is the SHA-256 hash of that plan. These
fields are execution identity and participate in config_hash.
Sweeps expose risk_chain_hash on candidate rows and carry
risk_plan_json in row-level provenance and reproduction keys. Saved sweeps
store both fields on the parent sweep row and candidate rows; the first
ledgr_sweep_save() against a v0.1.9.2 store performs an additive schema
migration for these risk identity columns. Missing pre-v0.1.9.3 risk fields
reopen as the no-op risk plan in memory; stored historical config JSON is not
rewritten by the compatibility normalizer.
Walk-forward identity
candidate_key identifies one walk-forward fold/window/candidate evaluation.
It includes strategy parameter identity, feature parameter identity,
strategy/feature/alias identity, metric-context identity, cost_model_hash,
risk_chain_hash, the master seed, fold_seq, and the window role
("train" or "test").
session_id identifies a walk-forward session envelope. It includes
snapshot, experiment, parameter-grid, fold-list, selection-rule,
metric-context, cost-model, risk-chain, master-seed, and opening-state policy
identity. These fields identify what ledgr evaluated; they do not prove that
the candidate-selection protocol was statistically sound.
Locator metadata
Walk-forward result objects may carry string locator attributes: db_path,
snapshot_id, and snapshot_hash. These are recovery and resolve-at-call
verification metadata used by helpers such as ledgr_candidate(). They are
not live handles, not identity bytes, and not inputs to config_hash,
candidate_key, or session_id.
Naming supersession
ledgr_candidate() is the candidate generic for sweep and walk-forward
result objects. Family-first public names and open reopen helpers follow
the v0.1.9.5 naming contract; historical family-specific candidate helpers
should be mapped to the generic in new documentation.
Where to inspect
In-session runs expose feature_set_hash at
bt$config$features$feature_set_hash. Durable stores expose it through
ledgr_run_info() and ledgr_run_list(). Sweep candidates expose
candidate-level feature and risk identity in their row-level provenance and
reproduction keys. Walk-forward result objects expose selected-candidate
identity through their session and candidate inspection helpers.