Fix artifact dict key mismatch (hash -> cid)
Template runs/detail.html expects artifact.cid but code provided artifact.hash, causing UndefinedError when viewing run details. - Change run_service.get_run_artifacts to return 'cid' key - Change runs.py router inline artifact creation to use 'cid' key - Add regression tests for artifact data structure Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -547,7 +547,7 @@ class RunService:
|
||||
path = self.cache.get_by_cid(cid)
|
||||
if path and path.exists():
|
||||
return {
|
||||
"hash": cid,
|
||||
"cid": cid,
|
||||
"size_bytes": path.stat().st_size,
|
||||
"media_type": detect_media_type(path),
|
||||
"role": role,
|
||||
|
||||
Reference in New Issue
Block a user