CHAT_OUTPUT_BEGIN
COMMAND_ID=RUNTIME-RECEIVER-CLEANUP-036
STATUS=FAIL
RC=1
HOST=pve01
MODE=change
COMPONENT=gitea-runtime
REFERENCE_REGISTER_CHECK=OK
REFERENCE_SHA256=f6f7749fda946015116cdbbd754c7e7f20356b4a6cf4df330a1b0b8fdf59cbb2
ERROR_REGISTER_CHECK=OK
ERROR_REGISTER_SHA256=ab8308549db90d235b591af0581580c3c7ba1b287b129cc6111c2eef0a0f9ecc
COMMAND_SHA256=65fbcfbce38a55723a92a8790429d6567389321f030f02cb4bf301cbe67e2531
DUPLICATE_FAILED_COMMAND_BLOCKED=false
EXECUTION_STARTED=true
CHANGES_MADE=true
SANITIZED=yes
SECRETS_INCLUDED=no
PRIVATE_ADDRESSES_INCLUDED=no
RAW_EVIDENCE_SHA256=52a8e9668f71c042d0dfc9cff61998fd7f661fd522cec91256c2e4546ee2f828
SANITIZED_OUTPUT_SHA256=52a8e9668f71c042d0dfc9cff61998fd7f661fd522cec91256c2e4546ee2f828
OUTPUT_BEGIN
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    from pathlib import Path; import shutil,datetime,subprocess; p=Path("/usr/local/sbin/homelab-runtime-receive"); a=p.read_text().splitlines(True); d=[i for i,x in enumerate(a) if x.rstrip().endswith("HEAD:assistant-runtime")]; assert len(d)==1; del a[d[0]]; s=next(i for i,x in enumerate(a) if x.startswith("git --git-dir=")); e=next(i for i in range(s,len(a)) if a[i].strip()=="fi"); del a[s:e+1]; t="".join(a); assert "update-ref" not in t and t.count("HEAD:refs/heads/assistant-runtime")==1; q=p.with_name(p.name+".new"); q.write_text(t); q.chmod(0o750); subprocess.run(["bash","-n",str(q)],check=True); b=p.with_name(p.name+".before-clean."+datetime.datetime.now(datetime.timezone.utc).strftime("%Y%m%dT%H%M%SZ")); shutil.copy2(p,b); q.replace(p); print("RECEIVER_CLEANUP=OK"); print("BACKUP="+str(b))
                                                                                                                                                                                                                                             ^^^^^^^^^
AssertionError

OUTPUT_END
CHAT_OUTPUT_END
