supervisor: unique cc-ci-supervisor web-UI name (same invariant as the upgrader)

_archive_stale_titles() generalized to (title, label); launch-supervisor's
spawn_supervisor() archives every older 'cc-ci-supervisor' session before
launching, so exactly one session carries the name. 11 historical supervisor
sessions archive-renamed live ('supervisor archive — <date> <time>').
This commit is contained in:
autonomic-bot
2026-08-04 16:49:03 +00:00
parent 0b6cc632d4
commit f750622e3d
2 changed files with 17 additions and 8 deletions
+6
View File
@@ -98,6 +98,12 @@ def spawn_supervisor(sid, reason):
Path(LOG_DIR).mkdir(parents=True, exist_ok=True)
if _sup_alive():
_sup_kill(); time.sleep(1)
# Unique-name invariant (same as the upgrader): archive-rename every older session titled
# SUP_SESSION so the one this launch creates is the ONLY 'cc-ci-supervisor' in the web UI.
try:
lu._archive_stale_titles(SUP_SESSION, "supervisor archive —")
except Exception:
pass
kf = Path(LOG_DIR) / f".kickoff-{SUP_SESSION}.txt"
kf.write_text(build_kickoff(sid, reason))
share = "--share" if OPENCODE_SHARE else ""