1 lightning.finite_horizon.studies.inventory
lightning.finite_horizon.studies.inventory
Project archived scorer receipts into an immutable, reproducible inventory.
The TOML selection describes which historical observations to expose, rather than recording mutable workflow state. All scientific metadata comes from byte-verified archive files and explicit JSON pointers. A report-only run is not a fit, and a planned cell is not an executed attempt. This projection does not re-admit a fitted model or establish independent scene observations.
1.1 Classes
| Name | Description |
|---|---|
| InventoryField | One metadata value read from authenticated historical evidence. |
| InventoryRowKind | Observation roles; only actual fits and fitted controls count as attempts. |
| InventoryStatus | Execution disposition, independent of scientific acceptance gates. |
| ScorerInventoryRecord | One selected fit, control group, intention, or zero-update probe. |
| ScorerStudyInventory | Receipt-derived snapshot with independently authenticated export provenance. |
1.1.1 InventoryField
lightning.finite_horizon.studies.inventory.InventoryField(
name,
logical_path,
historical_path,
source_sha256,
pointer,
value_json,
)One metadata value read from authenticated historical evidence.
1.1.1.1 Attributes
| Name | Description |
|---|---|
| name | Scientific field name selected for the inventory projection. |
| logical_path | Archive logical identity, independent of current filesystem location. |
| historical_path | Original source path retained for historical readback. |
| source_sha256 | Exact digest of the file containing the selected JSON value. |
| pointer | RFC 6901 pointer within a JSON document or its JSONL row array. |
| value_json | Immutable JSON serialization of the admitted value; null stays unknown. |
1.1.1.2 Methods
| Name | Description |
|---|---|
| value | Return a fresh projection; mutation cannot change admitted metadata. |
| to_jsonable | Emit exact source references, optionally including the selected value. |
1.1.1.2.1 value
lightning.finite_horizon.studies.inventory.InventoryField.value()Return a fresh projection; mutation cannot change admitted metadata.
1.1.1.2.2 to_jsonable
lightning.finite_horizon.studies.inventory.InventoryField.to_jsonable(
include_value=False,
)Emit exact source references, optionally including the selected value.
1.1.2 InventoryRowKind
lightning.finite_horizon.studies.inventory.InventoryRowKind()Observation roles; only actual fits and fitted controls count as attempts.
1.1.3 InventoryStatus
lightning.finite_horizon.studies.inventory.InventoryStatus()Execution disposition, independent of scientific acceptance gates.
1.1.4 ScorerInventoryRecord
lightning.finite_horizon.studies.inventory.ScorerInventoryRecord(
row_id,
kind,
status,
evidence_role,
fields,
unknowns,
)One selected fit, control group, intention, or zero-update probe.
1.1.4.1 Attributes
| Name | Description |
|---|---|
| row_id | Unique stable selection identity; never used as a runtime attempt ledger. |
| kind | Separates actual fits from grouped evidence and unexecuted intentions. |
| status | Receipt-backed execution disposition or explicit frozen intention status. |
| evidence_role | Direct receipt versus historical wrapper assertion qualification. |
| fields | Immutable source-bound metadata, including available identity/budget fields. |
| unknowns | Missing proof remains explicit rather than inferred from similar studies. |
1.1.4.2 Methods
| Name | Description |
|---|---|
| field | Select a documented field or fail on unavailable metadata. |
| to_jsonable | Emit references without duplicating large source populations by default. |
1.1.4.2.1 field
lightning.finite_horizon.studies.inventory.ScorerInventoryRecord.field(name)Select a documented field or fail on unavailable metadata.
1.1.4.2.2 to_jsonable
lightning.finite_horizon.studies.inventory.ScorerInventoryRecord.to_jsonable(
include_values=False,
)Emit references without duplicating large source populations by default.
1.1.5 ScorerStudyInventory
lightning.finite_horizon.studies.inventory.ScorerStudyInventory(
archive_manifest_sha256,
selection_sha256,
records,
)Receipt-derived snapshot with independently authenticated export provenance.
1.1.5.1 Attributes
| Name | Description |
|---|---|
| archive_manifest_sha256 | Externally pinned archive identity admitted by the transport owner. |
| selection_sha256 | Exact human-authored selection bytes used for this projection. |
| records | Stable ordered observations; repeated references to a fit are rejected. |
1.1.5.2 Methods
| Name | Description |
|---|---|
| to_jsonable | Export a portable inventory without making runtime or scientific claims. |
1.1.5.2.1 to_jsonable
lightning.finite_horizon.studies.inventory.ScorerStudyInventory.to_jsonable(
include_values=False,
)Export a portable inventory without making runtime or scientific claims.
1.2 Functions
| Name | Description |
|---|---|
| read_scorer_inventory | Admit an explicit TOML selection against an already verified study archive. |
1.2.1 read_scorer_inventory
lightning.finite_horizon.studies.inventory.read_scorer_inventory(
archive,
selection_path,
)Admit an explicit TOML selection against an already verified study archive.
Each field declares logical_path, sha256, and pointer. JSONL sources are treated as an ordered array of parsed rows. Optional per-row equal assertions compare two source references, rejecting identity or population mismatches before any output is returned. A source reference may declare schema to require that exact top-level JSON schema version.
Actual fits and fitted controls require a source-bound fit_identity or exact evidence receipt reference; normalized run IDs must be unique even when referenced through different report wrappers. Completed fits require positive realized_updates. Missing metadata must have a matching explicit unknown. Frozen intentions retain source-bound configuration but can never carry an executed fit ID.