feat: migrate live inventory to five-facet 0.3 and close WP-0006
All seven data/resources records now carry description, decision, reef/secret refs, and potential vs actual consumers. Discovered resources use decision.status: gap. Validators require live inventory to be 0.3. WP-0006 T03 done; workplan finished.
This commit is contained in:
parent
6e57a65360
commit
dafc812daa
11 changed files with 165 additions and 11 deletions
|
|
@ -50,7 +50,12 @@ def main() -> int:
|
|||
need |= v03
|
||||
assert not need - resource.keys(), f"missing fields: {need - resource.keys()}"
|
||||
validate_record(resource)
|
||||
assert any(resource.get("schema_version") == "0.3" for resource in resources)
|
||||
live = [resource for resource in resources if resource.get("record_scope") == "inventory"]
|
||||
assert live and all(resource.get("schema_version") == "0.3" for resource in live)
|
||||
assert all(
|
||||
"potential" in resource.get("consumers", {}) and "actual" in resource.get("consumers", {})
|
||||
for resource in live
|
||||
)
|
||||
operational_records = [load(str(path)) for path in Path("data/control-cycle").glob("*.json")]
|
||||
control_records += operational_records
|
||||
record_ids = {record["record_id"] for record in control_records}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue