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:
@@ -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 ""
|
||||
|
||||
Reference in New Issue
Block a user