Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions hermes_cli/kanban_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -7381,14 +7381,23 @@ def complete_task(
)
if survivor:
metadata = dict(metadata or {}, survivor=survivor)
survivor_note = (
f"survivor=patch {survivor['path']} {survivor['sha256']} {survivor['bytes']} NOT PUSHED"
if survivor['kind'] == 'patch' else
f"survivor=bundle {survivor['sidecar']} NOT PUSHED"
if survivor['kind'] == 'bundle' else "survivor=ref " + " ".join(
f"{ref['remote']}/{ref['branch']}@{ref['sha']}" for ref in survivor["refs"]
if survivor['kind'] == 'patch':
survivor_note = (
f"survivor=patch {survivor['path']} {survivor['sha256']} {survivor['bytes']} NOT PUSHED"
)
elif survivor['kind'] == 'bundle':
survivor_note = f"survivor=bundle {survivor['sidecar']} NOT PUSHED"
elif survivor['kind'] == 'landed':
survivor_note = "survivor=landed " + " ".join(
f"{entry['repository']}@{entry['sha']} ({entry['matched_by']})"
for entry in survivor["landed"]
)
else:
survivor_note = "survivor=ref " + " ".join(
f"{ref.get('repository_path') or ref['remote']}/{ref['branch']}@{ref['sha']}"
+ (" (live tree)" if ref.get("matched_by") == "canonical" else "")
for ref in survivor["refs"]
)
)
result = '\n'.join(filter(None, [result, survivor_note]))
metadata = _merge_completion_prose_artifacts(
conn, task_id, metadata, summary=summary, result=result,
Expand Down
Loading
Loading