Skip to content

Commit c117edd

Browse files
authored
Update cli.py
1 parent a7b459a commit c117edd

1 file changed

Lines changed: 21 additions & 4 deletions

File tree

cli.py

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,31 @@ def cmd_run(workflow_path: str) -> int:
109109
rdir.mkdir(parents=True, exist_ok=True)
110110

111111
raw = _resolve_workflow_path(workflow_path).read_bytes()
112-
steps = json.loads(raw).get("steps", [])
112+
wf = json.loads(raw)
113+
steps = wf.get("steps", [])
114+
claims = wf.get("claims", [])
115+
116+
# ---- AWO-aligned manifest with provenance context ----
113117
manifest = {
114118
"run_id": run_id,
115-
"workflow_sha256": _sha256_bytes(raw),
116-
"info_density": round(1.0 - _compress_ratio(raw), 4), # harmless proxy
117119
"started_at": ts,
118-
"steps": steps,
120+
121+
# provenance of the workflow used
122+
"workflow_id": wf.get("id"),
123+
"workflow_name": wf.get("name"),
124+
"workflow_sha256": _sha256_bytes(raw),
125+
126+
# AWO alignment
127+
"claims": [c.get("id") for c in claims],
128+
129+
# simple analytics (harmless placeholder)
130+
"info_density": round(1.0 - _compress_ratio(raw), 4),
131+
132+
# execution outline
133+
"steps": steps
119134
}
135+
# ------------------------------------------------------
136+
120137
(rdir / "run_manifest.json").write_text(json.dumps(manifest, indent=2), encoding="utf-8")
121138
(rdir / "SHA256SUMS.txt").write_text(f"{manifest['workflow_sha256']} {pathlib.Path(workflow_path)}\n", encoding="utf-8")
122139
print(f"✓ Run created: runs/{run_id}")

0 commit comments

Comments
 (0)