Drift Watch — Probe-Based (v1.1.0)
A service running is not the same as a service running what you think. This skill surfaces that gap using LIVE organ registry data — zero hardcoded paths or ports.
Canonical SOT
The organ registry at /root/AAA/federation/organs.yaml is the single source of truth for organ names, source paths, runtime locations, ports, and health endpoints. Read it FIRST.
# Discover all organs
python3 -c "
import yaml, json
with open('/root/AAA/federation/organs.yaml') as f:
reg = yaml.safe_load(f)
for o in reg.get('organs', []):
print(f'{o[\"id\"]} src={o.get(\"source_path\",\"?\")} runtime={o.get(\"runtime_path\",\"?\")} port={o.get(\"port\",\"?\")}')
"
Steps
Read organ registry —
cat /root/AAA/federation/organs.yamlor use the python snippet above. This gives you source_path, runtime_path, and port for every organ.For each organ with a source_path:
git -C <source_path> rev-parse HEAD→ source SHAcat <runtime_path>/.git_commit 2>/dev/null→ runtime SHA (if file exists)- Compare → if mismatch → DRIFT
For each organ with a port:
curl -sf --max-time 2 http://localhost:<port>/health→ probe live health- Parse the software_release block for deployed_commit
- Cross-reference with source SHA
If DRIFT detected:
- Source newer than runtime →
make deploy-localcandidate (per-organ) - Runtime newer than source → runtime patch not in source → 888 HOLD
- Runtime
.git_commitmissing → warn, treat source as truth
- Source newer than runtime →
Also check (from registry, not hardcoded):
- Caddy port map:
/etc/caddy/Caddyfile(sovereign-locked) - systemd units:
systemctl list-units --type=service | grep -E 'arifos|aforge|geox|wealth|well|aaa|arifflow' - env file presence:
/root/.secrets/kunci-mas.env(mode 600)
- Caddy port map:
Organ topology (derived live from registry — this table is a CACHED EXAMPLE, probe for truth)
| Organ | Source discovery | Runtime discovery | Health probe |
|---|---|---|---|
| arifOS | registry source_path |
registry runtime_path |
curl :8088/health |
| A-FORGE | registry source_path |
registry runtime_path |
curl :7071/health |
| GEOX | registry source_path |
registry runtime_path |
curl :8081/health |
| WEALTH | registry source_path |
registry runtime_path |
curl :18082/health |
| WELL | registry source_path |
registry runtime_path |
curl :18083/health |
| AAA | registry source_path |
registry runtime_path |
curl :3001/health |
| arifFlow | registry source_path |
registry runtime_path |
curl :7073/health |
Rule: The table above is illustrative. The organ registry is authoritative. If they differ, the registry wins. Fix this SKILL.md.
Verification loop
- Match → no action
- Mismatch → log + 888 HOLD with both SHAs + recommended action
.git_commitmissing on runtime → log warning, treat source as truth- Organ DOWN → skip SHA comparison for that organ, flag in report
Failure modes
- Runtime file missing → assume source is truth, surface to operator
- Mismatch in
.git_commitonly (cosmetic) → warn, don't HOLD - Source repo not on
main→ flag, ask if intentional - Registry unreachable → fall back to filesystem inspection of known paths
De-hardcoding log (v1.1.0)
- Replaced hardcoded organ paths with registry-derived values
- Port numbers read from
/root/AAA/federation/organs.yamllive - Health endpoints probed dynamically rather than assumed
- Added graceful degradation: if registry unavailable, fall back to filesystem scan