CHAT_OUTPUT_BEGIN
COMMAND_ID=HOMELAB-GITEA-CHAT-TRANSPORT-AUDIT-373
STATUS=OK
RC=0
HOST=pve01
MODE=read-only
COMPONENT=cluster-audit
REFERENCE_REGISTER_CHECK=OK
REFERENCE_SHA256=5763f2f8edc75fcf6f3951f8c95896d1cc112ceccb6cf5b64a383f540a4deb8e
ERROR_REGISTER_CHECK=OK
ERROR_REGISTER_SHA256=08b3a769b8e38eaa1acec915352fb328180d70caa7ff6cd9d1ec0da426262752
COMMAND_SHA256=3a9ed987129355bdf4bf8196206f17e111bde7c10cf4865a4e860249e49dd2e5
DUPLICATE_FAILED_COMMAND_BLOCKED=false
EXECUTION_STARTED=true
CHANGES_MADE=false
SANITIZED=yes
SECRETS_INCLUDED=no
PRIVATE_ADDRESSES_INCLUDED=no
RAW_EVIDENCE_SHA256=1e8ff2ecf2d6dba9d86a31d1dd9c3c11a02eb154d7c42a46a8d0fe282146a619
SANITIZED_OUTPUT_SHA256=1e8ff2ecf2d6dba9d86a31d1dd9c3c11a02eb154d7c42a46a8d0fe282146a619
OUTPUT_BEGIN
DETAIL=RUNNER_FILE=/usr/local/sbin/homelab-chat-run|SHEBANG=#!/usr/bin/env bash|META=root:root|750|11864|regular file|SHA256=2a88defef9517f89bc60934dce82097f8e316b08af9417e95167ea5d759a10d9|BASH_SYNTAX=PASS
DETAIL=RUNNER_FILE=/usr/local/sbin/homelab-chat-run-linked|SHEBANG=#!/usr/bin/env bash|META=root:root|755|1289|regular file|SHA256=efa9fce3c768e6e0650903ca14fe4b6d5319d57f20ec87c465a4a00cb300d4e0|BASH_SYNTAX=PASS
DETAIL=LINKED_WRAPPER_SOURCE_BEGIN
#!/usr/bin/env bash
set -o pipefail
tmp=$(/usr/bin/mktemp)
trap '/usr/bin/rm -f "$tmp"' EXIT

/usr/local/sbin/homelab-chat-run "$@" 2>&1 | /usr/bin/tee "$tmp"
rc=${PIPESTATUS[0]}

cid=$(/usr/bin/sed -n "s/^COMMAND_ID=//p" "$tmp" | /usr/bin/tail -n 1)
sha=$(/usr/bin/sed -n "s/^COMMIT_SHA=//p" "$tmp" | /usr/bin/tail -n 1)
raw=$(/usr/bin/sed -n "s/^LOCAL_RAW_FILE=//p" "$tmp" | /usr/bin/tail -n 1)

if [[ "$cid" =~ ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$ && "$sha" =~ ^[0-9a-f]{40}$ ]]; then
    /usr/bin/printf "COMMIT_URL=https://git.gram1.ru/homelab-admin/homelab-public-context/commit/%s\n" "$sha"
    /usr/bin/printf "IMMUTABLE_RESULT_URL=https://git.gram1.ru/homelab-admin/homelab-public-context/raw/commit/%s/runtime/history/%s.txt\n" "$sha" "$cid"
fi

/usr/bin/printf "FAILURE_DIAGNOSTIC_BEGIN\n"
if [[ -n "$raw" && -r "$raw" ]]; then
    /usr/bin/grep -Ei '^(DECISION|DETAIL|FAILURE_REASON|ERROR_CODE|SOURCE_DECISION|NGINX_[A-Z0-9_]*|READER_[A-Z0-9_]*|RESULT_FEED_URL|PUBLIC_HEALTH_URL|HTTPS_[A-Z0-9_]*|LOCAL_[A-Z0-9_]*|CHANGES_MADE)=|Traceback|RuntimeError|SystemExit|FileNotFoundError|PermissionError|command not found|No such file or directory|Connection refused|failed|invalid|missing' "$raw" | /usr/bin/tail -n 100 || true
fi
/usr/bin/printf "FAILURE_DIAGNOSTIC_END\n"

exit "$rc"
DETAIL=LINKED_WRAPPER_SOURCE_END
DETAIL=MAIN_RUNNER_PUBLICATION_HOOKS_BEGIN
88-    exit 70
89-}
90-
91-STATE_DIR=/var/lib/homelab-chat-run
92-RAW_DIR="$STATE_DIR/raw"
93-PUBLIC_DIR="$STATE_DIR/public"
94:LEDGER="$STATE_DIR/state/command-ledger.tsv"
95-LOCK="$STATE_DIR/state/runner.lock"
96-
97-mkdir -p "$RAW_DIR" "$PUBLIC_DIR" "$(dirname "$LEDGER")"
98-chmod 0700 "$STATE_DIR" "$RAW_DIR" "$PUBLIC_DIR" "$(dirname "$LEDGER")"
99-touch "$LEDGER"
100-chmod 0600 "$LEDGER"
--
490-        '${REMOTE_PREFIX}.json' \
491-        '${REMOTE_PREFIX}.txt'
492-
493-    exit \$receiver_rc
494-"
495-
496:PUBLIC_URL='https://git.gram1.ru/.well-known/homelab-runtime/latest.json'
497-PUBLIC_VISIBLE=false
498-
499-for ATTEMPT in $(seq 1 30); do
500-    CONTENT="$(
501-        curl -fsS \
502-            --max-time 15 \
503:            "$PUBLIC_URL" 2>/dev/null ||
504-        true
505-    )"
506-
507-    if printf '%s\n' "$CONTENT" |
508-       grep -Fq "\"command_id\": \"$COMMAND_ID\""; then
509-        PUBLIC_VISIBLE=true
--
534-echo "COMMAND_ID=$COMMAND_ID"
535-echo "STATUS=$STATUS"
536-echo "RC=$RC"
537-echo 'REFERENCE_REGISTER_CHECK=OK'
538-echo 'ERROR_REGISTER_CHECK=OK'
539-echo "DUPLICATE_FAILED_COMMAND_BLOCKED=$REPEAT_BLOCKED"
540:echo 'GITEA_PUBLICATION=OK'
541:echo "PUBLIC_URL=$PUBLIC_URL"
542-echo "LOCAL_RAW_FILE=$RAW_FILE"
543-echo 'SHELL_SESSION_PRESERVED=yes'
544-
545-exit "$RC"
DETAIL=MAIN_RUNNER_PUBLICATION_HOOKS_END
DETAIL=VM170_PUBLIC_DIRECTORY_METADATA=debian:debian|755|4096|directory
DETAIL=VM170_WELLKNOWN_FILES_BEGIN
/opt/stacks/gitea/data/gitea/public/.well-known/gitea-auth-check-014.txt|132|644|root:root
/opt/stacks/gitea/data/gitea/public/.well-known/homelab-context-manifest.json|838|644|debian:debian
/opt/stacks/gitea/data/gitea/public/.well-known/runtime-receiver-state-026.txt|368|644|root:root
/opt/stacks/gitea/data/gitea/public/.well-known/gitea-push-auth-stage-012.txt|115|644|root:root
/opt/stacks/gitea/data/gitea/public/.well-known/homelab-runtime/latest.json|1517|644|root:root
/opt/stacks/gitea/data/gitea/public/.well-known/homelab-runtime/index.json|436|644|root:root
/opt/stacks/gitea/data/gitea/public/.well-known/homelab-runtime/latest.txt|1063|644|root:root
/opt/stacks/gitea/data/gitea/public/.well-known/homelab-bootstrap.json|3097|644|root:root
/opt/stacks/gitea/data/gitea/public/.well-known/homelab-context.txt|1710|644|debian:debian
/opt/stacks/gitea/data/gitea/public/.well-known/homelab-bootstrap.json.bak.20260721T093110Z|3154|644|root:root
/opt/stacks/gitea/data/gitea/public/.well-known/gitea-real-push-canary.txt|136|644|root:root
/opt/stacks/gitea/data/gitea/public/.well-known/homelab-context.json|2334|644|debian:debian
/opt/stacks/gitea/data/gitea/public/.well-known/homelab-bootstrap.json.bak.20260721T092825Z|1915|644|root:root
/opt/stacks/gitea/data/gitea/public/.well-known/runtime-receiver-preflight-020.txt|807|644|root:root
/opt/stacks/gitea/data/gitea/public/.well-known/gitea-auth-check-017.txt|82|644|root:root
DETAIL=VM170_WELLKNOWN_FILES_END
DETAIL=BOOTSTRAP_HTTP_HEADERS_BEGIN
HTTP/2 200 
content-type: application/json
cache-control: max-age=0, private, must-revalidate, no-transform
last-modified: Tue, 21 Jul 2026 09:31:10 GMT
DETAIL=BOOTSTRAP_HTTP_HEADERS_END
DETAIL=PUBLIC_HANDOFF_HTTP_STATUS=404
DETAIL=GITEA_CHAT_TRANSPORT_AUDIT=PASS
CHANGES_MADE=NO

OUTPUT_END
CHAT_OUTPUT_END
