K3Z Metadata and Lineage
Scope
This page documents the current metadata inventory, build lineage, and
provenance policy for the tracked K3Z sample model package at
models/k3z_patchworks_model plus the validated export mirrors under
output/patchworks_k3z*_validated.
Machine-readable companion registry:
models/k3z_patchworks_model/metadata/lineage_registry.yaml
Inventory: Upstream Sources -> Model Artifacts
The key dataset families feeding output/, tracks/, and blocks/ are:
Target artifact family |
Current in-repo path |
Upstream source datasets |
Primary compiler step |
|---|---|---|---|
Fragments shapefile |
|
|
|
ForestModel XML |
|
|
|
Blocks shapefile |
|
|
|
Block topology CSV |
|
|
|
Build-Lineage Chain
Current canonical lineage for the tracked K3Z model:
Bundle/checkpoint stage (FEMIC pipeline output):
data/model_input_bundle/*.csv+ checkpoint feather.Patchworks export stage:
femic export patchworks --tsa k3z --seral-stage-config config/seral.k3z.yaml. This producesoutput/patchworks/forestmodel.xmlandoutput/patchworks/fragments/fragments.*.Validated-export stage:
output/patchworks/forestmodel.xml->output/patchworks_k3z_validated/forestmodel.xmlandoutput/patchworks/fragments/*->output/patchworks_k3z_validated/fragments/*.Blocks stage:
femic patchworks build-blocks --config config/patchworks.runtime.windows.yaml.Matrix stage:
femic patchworks matrix-build --config config/patchworks.runtime.windows.yaml. Tracks CSVs are rebuilt inmodels/k3z_patchworks_model/tracks.Account-promotion stage (automatic in matrix-build):
tracks/protoaccounts.csv->tracks/accounts.csvwith timestamped backup.
Component-Level Notes
Fragments compiler semantics:
build_fragments_geodataframe(...)scopes checkpoint rows by the legacy case/FMU code field and AU, computes area/age fields, and resolves IFM assignment from THLB signal columns (or explicit IFM options).ForestModel compiler semantics: built from normalized AU/curve context derived from bundle tables; optional seral-stage boundaries are loaded from YAML.
Blocks compiler semantics: strict stand:block identity mode;
BLOCKis copied from stand identifier field (FEATURE_ID/FRAGS_ID) in fragments.Matrix compiler semantics: Matrix Builder consumes
fragments.dbf+forestmodel.xmland writestracks/*.csv; FEMIC evaluates completion by artifact readiness and fatal log signatures.
Provenance Versioning Policy
Use this policy for each rebuild intended for teaching/collaboration release:
Treat these as authoritative source inputs: run-profile/config values, bundle tables, checkpoint feather, and seral config YAML.
Rebuild in deterministic order: export patchworks -> sync model inputs -> build blocks -> matrix-build.
Preserve run evidence: keep run-scoped manifests/logs under
runtime/logsfor rebuild events.Commit artifact + metadata updates together: model artifacts changed by rebuild, updates to this page and
lineage_registry.yaml, the governingROADMAP.mdphase/task entry, any linked planning note, and matching CHANGE_LOG.md entry.Never hand-edit generated families in release prep:
tracks/*.csv,blocks/blocks.*, and generated topology CSV. Regenerate instead.
Acceptance Checklist for Lineage Updates
Source inventory still maps all current
output/,tracks/, andblocks/artifacts.Command chain and runtime config references remain accurate.
Registry file is updated for any path/command/schema changes.
Related roadmap/changelog notes are appended in the same milestone.