diff --git a/runtime/history/RUNTIME-RECEIVER-ROLLBACK-038.json b/runtime/history/RUNTIME-RECEIVER-ROLLBACK-038.json new file mode 100644 index 0000000..959b345 --- /dev/null +++ b/runtime/history/RUNTIME-RECEIVER-ROLLBACK-038.json @@ -0,0 +1,30 @@ +{ + "schema_version": 1, + "channel": "homelab-runtime", + "command_id": "RUNTIME-RECEIVER-ROLLBACK-038", + "status": "OK", + "rc": 0, + "host": "pve01", + "mode": "change", + "component": "gitea-runtime", + "started_at_utc": "2026-07-21T10:30:05Z", + "finished_at_utc": "2026-07-21T10:30:05Z", + "reference_register_checked": true, + "reference_sha256": "f6f7749fda946015116cdbbd754c7e7f20356b4a6cf4df330a1b0b8fdf59cbb2", + "error_register_checked": true, + "error_register_sha256": "ab8308549db90d235b591af0581580c3c7ba1b287b129cc6111c2eef0a0f9ecc", + "command_sha256": "17db26ead40b8843899f7866c89d6385ea704189d6241b5503f1fd71570c3a86", + "duplicate_failed_command_blocked": false, + "block_reason": null, + "execution_started": true, + "changes_made": true, + "sanitized": true, + "secrets_included": false, + "private_addresses_included": false, + "raw_evidence_retained_locally": true, + "raw_evidence_sha256": "56384a1c14e006aba6bfaa0f26b04a45e729338d5041ed780cd9bc3feccd7270", + "sanitized_output_sha256": "56384a1c14e006aba6bfaa0f26b04a45e729338d5041ed780cd9bc3feccd7270", + "output_truncated_in_json": false, + "full_sanitized_output_url": "https://git.gram1.ru/.well-known/homelab-runtime/latest.txt", + "output": "RECEIVER_ROLLBACK=OK\nBROKEN_CLEANUP_REVERTED=YES\n" +} diff --git a/runtime/history/RUNTIME-RECEIVER-ROLLBACK-038.txt b/runtime/history/RUNTIME-RECEIVER-ROLLBACK-038.txt new file mode 100644 index 0000000..55b42cd --- /dev/null +++ b/runtime/history/RUNTIME-RECEIVER-ROLLBACK-038.txt @@ -0,0 +1,26 @@ +CHAT_OUTPUT_BEGIN +COMMAND_ID=RUNTIME-RECEIVER-ROLLBACK-038 +STATUS=OK +RC=0 +HOST=pve01 +MODE=change +COMPONENT=gitea-runtime +REFERENCE_REGISTER_CHECK=OK +REFERENCE_SHA256=f6f7749fda946015116cdbbd754c7e7f20356b4a6cf4df330a1b0b8fdf59cbb2 +ERROR_REGISTER_CHECK=OK +ERROR_REGISTER_SHA256=ab8308549db90d235b591af0581580c3c7ba1b287b129cc6111c2eef0a0f9ecc +COMMAND_SHA256=17db26ead40b8843899f7866c89d6385ea704189d6241b5503f1fd71570c3a86 +DUPLICATE_FAILED_COMMAND_BLOCKED=false +EXECUTION_STARTED=true +CHANGES_MADE=true +SANITIZED=yes +SECRETS_INCLUDED=no +PRIVATE_ADDRESSES_INCLUDED=no +RAW_EVIDENCE_SHA256=56384a1c14e006aba6bfaa0f26b04a45e729338d5041ed780cd9bc3feccd7270 +SANITIZED_OUTPUT_SHA256=56384a1c14e006aba6bfaa0f26b04a45e729338d5041ed780cd9bc3feccd7270 +OUTPUT_BEGIN +RECEIVER_ROLLBACK=OK +BROKEN_CLEANUP_REVERTED=YES + +OUTPUT_END +CHAT_OUTPUT_END diff --git a/runtime/latest.json b/runtime/latest.json index 103565a..959b345 100644 --- a/runtime/latest.json +++ b/runtime/latest.json @@ -1,19 +1,19 @@ { "schema_version": 1, "channel": "homelab-runtime", - "command_id": "RUNTIME-RECEIVER-CLEANUP-036", - "status": "FAIL", - "rc": 1, + "command_id": "RUNTIME-RECEIVER-ROLLBACK-038", + "status": "OK", + "rc": 0, "host": "pve01", "mode": "change", "component": "gitea-runtime", - "started_at_utc": "2026-07-21T10:26:18Z", - "finished_at_utc": "2026-07-21T10:26:18Z", + "started_at_utc": "2026-07-21T10:30:05Z", + "finished_at_utc": "2026-07-21T10:30:05Z", "reference_register_checked": true, "reference_sha256": "f6f7749fda946015116cdbbd754c7e7f20356b4a6cf4df330a1b0b8fdf59cbb2", "error_register_checked": true, "error_register_sha256": "ab8308549db90d235b591af0581580c3c7ba1b287b129cc6111c2eef0a0f9ecc", - "command_sha256": "65fbcfbce38a55723a92a8790429d6567389321f030f02cb4bf301cbe67e2531", + "command_sha256": "17db26ead40b8843899f7866c89d6385ea704189d6241b5503f1fd71570c3a86", "duplicate_failed_command_blocked": false, "block_reason": null, "execution_started": true, @@ -22,9 +22,9 @@ "secrets_included": false, "private_addresses_included": false, "raw_evidence_retained_locally": true, - "raw_evidence_sha256": "52a8e9668f71c042d0dfc9cff61998fd7f661fd522cec91256c2e4546ee2f828", - "sanitized_output_sha256": "52a8e9668f71c042d0dfc9cff61998fd7f661fd522cec91256c2e4546ee2f828", + "raw_evidence_sha256": "56384a1c14e006aba6bfaa0f26b04a45e729338d5041ed780cd9bc3feccd7270", + "sanitized_output_sha256": "56384a1c14e006aba6bfaa0f26b04a45e729338d5041ed780cd9bc3feccd7270", "output_truncated_in_json": false, "full_sanitized_output_url": "https://git.gram1.ru/.well-known/homelab-runtime/latest.txt", - "output": "Traceback (most recent call last):\n File \"\", line 1, in \n 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))\n ^^^^^^^^^\nAssertionError\n" + "output": "RECEIVER_ROLLBACK=OK\nBROKEN_CLEANUP_REVERTED=YES\n" } diff --git a/runtime/latest.txt b/runtime/latest.txt index f85e5ce..55b42cd 100644 --- a/runtime/latest.txt +++ b/runtime/latest.txt @@ -1,7 +1,7 @@ CHAT_OUTPUT_BEGIN -COMMAND_ID=RUNTIME-RECEIVER-CLEANUP-036 -STATUS=FAIL -RC=1 +COMMAND_ID=RUNTIME-RECEIVER-ROLLBACK-038 +STATUS=OK +RC=0 HOST=pve01 MODE=change COMPONENT=gitea-runtime @@ -9,21 +9,18 @@ REFERENCE_REGISTER_CHECK=OK REFERENCE_SHA256=f6f7749fda946015116cdbbd754c7e7f20356b4a6cf4df330a1b0b8fdf59cbb2 ERROR_REGISTER_CHECK=OK ERROR_REGISTER_SHA256=ab8308549db90d235b591af0581580c3c7ba1b287b129cc6111c2eef0a0f9ecc -COMMAND_SHA256=65fbcfbce38a55723a92a8790429d6567389321f030f02cb4bf301cbe67e2531 +COMMAND_SHA256=17db26ead40b8843899f7866c89d6385ea704189d6241b5503f1fd71570c3a86 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 +RAW_EVIDENCE_SHA256=56384a1c14e006aba6bfaa0f26b04a45e729338d5041ed780cd9bc3feccd7270 +SANITIZED_OUTPUT_SHA256=56384a1c14e006aba6bfaa0f26b04a45e729338d5041ed780cd9bc3feccd7270 OUTPUT_BEGIN -Traceback (most recent call last): - File "", line 1, in - 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 +RECEIVER_ROLLBACK=OK +BROKEN_CLEANUP_REVERTED=YES OUTPUT_END CHAT_OUTPUT_END