CHAT_OUTPUT_BEGIN
COMMAND_ID=CLUSTER-REFERENCE-PUBLISHER-CONTRACT-AUDIT-171
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=1299fe30eb30386fec901e120ab525ece490edc5eca767d9216466ecd225bef5
DUPLICATE_FAILED_COMMAND_BLOCKED=false
EXECUTION_STARTED=true
CHANGES_MADE=false
SANITIZED=yes
SECRETS_INCLUDED=no
PRIVATE_ADDRESSES_INCLUDED=no
RAW_EVIDENCE_SHA256=ced96ca03c186b7a4b64cc4939add95121ad329963b7fddde6c5fcde8c47940f
SANITIZED_OUTPUT_SHA256=ced96ca03c186b7a4b64cc4939add95121ad329963b7fddde6c5fcde8c47940f
OUTPUT_BEGIN
PREVIOUS_RESULT=VERIFIED
=== OPERATIONS_PUBLISH_CONTEXT ===
1-# Operations
2-
3-List: homelab-reference list
4-Read: homelab-reference get SECTION ID --layer effective
5-Add: homelab-reference add SECTION JSON
6-Edit: homelab-reference edit SECTION ID --set key=value
7-Remove: homelab-reference remove SECTION ID
8-Validate: homelab-reference validate
9-Merge: homelab-reference merge
10-Refresh: homelab-reference-refresh
11:Publish: homelab-reference-publish
12-
13-Immutable runtime history for the exact COMMAND_ID is authoritative. latest.json is not authoritative.
=== ACTIVE_CODE_REFERENCES ===
=== REFRESH_RELEVANT_LINES ===
5:S=json.loads((R/"manifest.json").read_text())["sections"]
34: f=int(json.loads((R/"manifest.json").read_text()).get("freshness_seconds",{}).get(s,3600));z=(t+datetime.timedelta(seconds=f)).isoformat()
131: st=load("state","current") if False else json.loads((R/"state/current.json").read_text());st.update({"schema_version":2,"status":"AUTO_REFRESH_READY","updated_at":t.isoformat(),"last_snapshot":str(snap),"observed_counts":cnt,"effective_counts":eff,"public_index":str(R/"public/index.json"),"collector":str(pathlib.Path(__file__))});atom(R/"state/current.json",st)
=== CLI_RELEVANT_LINES ===
43:    manifest = json.loads((ROOT / "manifest.json").read_text(encoding="utf-8"))
44:    return manifest.get("sections", [])
65:def validate_section(layer, section):
105:def cmd_status(args):
106:    state_path = ROOT / "state" / "current.json"
108:    print("status=" + str(state.get("status", "UNKNOWN")))
120:        print(str(record.get("id")) + "\t" + str(record.get("name", "")) + "\t" + str(record.get("status", "")))
176:def cmd_validate(args):
182:            errors.extend(validate_section(layer, section))
205:p = sub.add_parser("status"); p.set_defaults(func=cmd_status)
211:p = sub.add_parser("validate"); p.add_argument("section", nargs="?"); p.add_argument("--layer", choices=LAYERS); p.set_defaults(func=cmd_validate)
=== UNIT_FILES ===
# /etc/systemd/system/homelab-reference-refresh.service
[Unit]
Description=Refresh homelab cluster reference
After=network-online.target pve-cluster.service
Wants=network-online.target

[Service]
Type=oneshot
ExecStart=/usr/local/sbin/homelab-reference-refresh
User=root
Group=root
Nice=10
IOSchedulingClass=best-effort
IOSchedulingPriority=7
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ReadWritePaths=/etc/homelab/reference /var/backups/homelab-reference
ProtectHome=read-only

# /etc/systemd/system/homelab-reference-refresh.timer
[Unit]
Description=Periodic homelab reference refresh

[Timer]
OnBootSec=10min
OnUnitActiveSec=30min
RandomizedDelaySec=5min
Persistent=true
Unit=homelab-reference-refresh.service

[Install]
WantedBy=timers.target
=== MANIFEST_CONTRACT ===
2:  "schema_version": 2,
4:  "updated_at": "2026-07-22T08:12:10+00:00",
=== STATE_CONTRACT ===
2:  "schema_version": 2,
3:  "status": "AUTO_REFRESH_READY",
4:  "updated_at": "2026-07-22T10:01:14+00:00",
REFERENCE_CHECK=OK
ERROR_REGISTER_CHECK=OK
SECRET_PRINTED=NO
PUBLISHER_CONTRACT_AUDIT=COMPLETE

OUTPUT_END
CHAT_OUTPUT_END
