فهرست منبع

AGENTS.md: document occupancy-guarded shared extras in power off

Alexander Korolev 6 روز پیش
والد
کامیت
f0110cd14a
1فایلهای تغییر یافته به همراه9 افزوده شده و 0 حذف شده
  1. 9 0
      AGENTS.md

+ 9 - 0
AGENTS.md

@@ -914,6 +914,15 @@ credential-free).
 ## Power
 
 - `off`: SSH shutdown → wait → HA `turn_off` per-node entities + cluster extras
+- **shared extras are occupancy-guarded**: the fabric switch / fan are ONE
+  physical device listed in the `extra_entities` of several clusters. `off`
+  never turns off an extra that **another cluster with an open run-ledger entry
+  still references** (`runlock::open_runs`) — powering `8nodes-switch` down must
+  not kill a serve on `dgx58-switch` over the same `switch.sw6_mt`. A subset
+  `off --node` keeps ALL of the cluster's extras (its own remaining nodes need
+  the fabric). The ledger over-reports (a stale open run keeps the device on) —
+  the safe direction. Logs `keeping <entity> on — still in use by an active run
+  on cluster(s): …` (`src/power/toggle.rs::extras_held_by_other_clusters`)
 - `on`: HA `turn_on` with **ensure-powered**: a node the caller believes down (web: last
   fleet snapshot; CLI: 1.5 s TCP probe) whose plug reads on gets a **30 s plug power cycle**
   (a shorter cut leaves the PSU rail energized — the machine stays in soft-off). Each node's