Skip to content

Commit 5b85f60

Browse files
committed
aggregate_results: preserve project/directory on failure/skip entries
_clean_result() dropped the internal _project/_directory tags entirely, so failures/skipped entries in report.json carried no workspace attribution (slowest already worked around this by re-attaching project by hand). Needed so PyAutoHeart's M3 stage-report reshaping can map each failure back to its workspace. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V4xvQJFsdgi2DtSdF89EqX
1 parent 71936fb commit 5b85f60

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

autobuild/aggregate_results.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,20 @@ def aggregate(results_dir: Path) -> dict:
209209

210210

211211
def _clean_result(r: dict) -> dict:
212-
"""Remove internal keys from a result dict."""
213-
return {k: v for k, v in r.items() if not k.startswith("_")}
212+
"""Strip internal keys from a result dict, surfacing project/directory as public fields.
213+
214+
``_project`` / ``_directory`` are stamped onto every result in ``aggregate()``
215+
for cross-run grouping; keeping them (renamed, without the underscore) means
216+
consumers of ``failures`` / ``skipped`` (e.g. PyAutoHeart's stage-report
217+
reshaping) don't lose which workspace a failure came from, matching what
218+
``slowest`` already re-attaches by hand below.
219+
"""
220+
out = {k: v for k, v in r.items() if not k.startswith("_")}
221+
if "_project" in r:
222+
out["project"] = r["_project"]
223+
if "_directory" in r:
224+
out["directory"] = r["_directory"]
225+
return out
214226

215227

216228
def generate_markdown(report: dict) -> str:

0 commit comments

Comments
 (0)