crv.io.run_manifest
Experimental API
crv.io.run_manifest
Run-bundle manifest writer and indexers for canonical tables and artifacts.
Layout (file protocol baseline)
-
Notes
- This module depends only on stdlib and crv.core.* (for SCHEMA_V) plus local io helpers.
- It does NOT read parquet files for canonical table stats; it only reads per-table manifests.
- For artifacts, it best-effort collects file sizes and optionally row counts if Polars is importable.
+
+Tables Index Schema (bundle.manifest["tables"]):
+- "
crv.io.run_manifest.bundle_manifest_path
Path to the run-bundle manifest file.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
" |
Source code in src/crv/io/run_manifest.py
crv.io.run_manifest.collect_tables_index
collect_tables_index(
settings: crv.io.config.IoSettings, run_id: crv.core.ids.RunId
) -> dict[str, Any]
Build an index of canonical tables for a run by reading per-table manifests.
Returns:
| Type | Description |
|---|---|
dict[str, typing.Any]
|
dict[str, Any]: Mapping of table_name -> {rows, bytes, tick_min, tick_max, buckets} |
Source code in src/crv/io/run_manifest.py
crv.io.run_manifest.collect_artifacts_index
collect_artifacts_index(
settings: crv.io.config.IoSettings, run_id: crv.core.ids.RunId
) -> dict[str, Any]
Index lab artifacts (tidy/probes/policy/audit) present under the run's artifacts directory.
Returns:
| Type | Description |
|---|---|
dict[str, typing.Any]
|
dict[str, Any]: {"lab": {"tidy":[...], "probes":[...], "policy":[...], "audit":[...]}, "world":{}, "mind":{}} |
Source code in src/crv/io/run_manifest.py
crv.io.run_manifest.write_run_bundle_manifest
write_run_bundle_manifest(
settings: crv.io.config.IoSettings,
run_id: crv.core.ids.RunId,
*,
meta: dict[str, typing.Any] | None = None
) -> dict[str, Any]
Compose and persist the run-bundle manifest atomically.
Returns:
| Type | Description |
|---|---|
dict[str, typing.Any]
|
dict[str, Any]: The manifest payload that was written. |