Category: local topology runtime cache (companion to orama D47 / PT portable-memory rules). Enforcement:
scripts/git/check_local_runtime_overlay.py(pre-commit + CI).
| Layer | What it is | Git rule |
|---|---|---|
Committed schema (HEAD) |
Device/model structure, empty lan_ip, loopback or env-var host defaults |
Must stay free of operator LAN addresses |
| Working-tree overlay | Last discovery / dispatch probe wrote real DHCP IPs into the same files | Keep locally — never discard with git checkout |
Discovery and dispatch may refresh lan_ip and model host defaults from live probes
(orchestrator/lan_discovery.py, discover.py, model registry). That drift is
expected operator state, not accidental dirty files.
Canonical live topology also flows through ignored runtime files
(.env.local, ~/.openclaw/state/last_discovery.json). The YAML overlay is a
repo-local convenience cache so PT can boot without re-probing every process.
- Never commit RFC1918 / operator LAN values in these two files. Pre-commit blocks staged content.
- Never
git checkout/git restorethese paths to “clean up” before pull, rebase, or integrity checks. Stash them if a merge would overwrite them:git stash push -m "runtime overlay" -- config/devices.yml config/models.yml. - After pull / merge, let discovery refresh them, or restore stash with hooks safeguard:
git -c core.hooksPath=/dev/null stash popthenbash scripts/git/install-local-hooks.sh(see oramastash-hooks-safeguardcard). git statusshowingM config/devices.ymlis normal on an active machine — not a hygiene failure.
When comparing a fresh origin/main checkout to a local worktree:
M config/devices.yml/M config/models.ymlwith LAN values = expected overlay, not merge corruption.- Compare committed trees (
git archive origin/main) or runcheck_local_runtime_overlay.py --mode treeon the fresh clone only. - Do not treat local overlay drift as something to
git checkoutaway.
| Mode | Command | When |
|---|---|---|
staged (default) |
check_local_runtime_overlay.py |
pre-commit — blocks git add of LAN IPs |
tree |
check_local_runtime_overlay.py --mode tree |
CI — validates committed branch content |
To make git add -A less footgun-prone on this machine:
git update-index --skip-worktree config/devices.yml config/models.ymlUndo with --no-skip-worktree. This is local only (not committed).
../CLAUDE.md§6 — Git hygiene- orama skill cards (canonical git doctrine):
../orama-system/docs/wiki/08-git-hygiene-and-branching.md— stash-first + overlay + CLAYGO (orama wiki)../orama-system/docs/v2/17-hardware-policy-enforcement.md— hardware topology layer../orama-system/docs/v2/47-portable-memory-local-topology-invariant.md— tracked policy vs local fragments