fix(runtime): retain malformed launch publications safely

This commit is contained in:
Alexandre Teixeira
2026-10-02 23:57:57 +01:00
parent 3d7d32dbe2
commit 721b5ca831
2 changed files with 27 additions and 1 deletions
+2 -1
View File
@@ -438,7 +438,8 @@ def retire_launch(launch, containment_id, *, job=None):
published = json.loads(path.read_text())
except FileNotFoundError:
return False
if (published.get("launch") != launch.to_dict()
if (not isinstance(published, dict)
or published.get("launch") != launch.to_dict()
or published.get("containment_id") != containment_id
or published.get("job") != (job.to_dict() if job else None)):
return False