Initial commit: apkovl deployment source, synced from shell-project main
This directory is what gets packaged into localhost.apkovl.tar.gz and
baked into adaptiveos-vN.iso. It had drifted out of sync with the real
project (root/shell-project/ had gone missing entirely at some point
after being written earlier this session -- cause unconfirmed, Desktop
is a plausible sync-related suspect but not verified) and separately
carried a stale, pre-fix copy of fx.sh.
Current contents:
etc/profile.d/adaptive-loop.sh -- disk-persists p AND p.trace
(fx()'s fix-provenance record)
across reboot, two separate 1MB
blocks on the attached state disk
etc/profile.d/adaptive-setup.sh -- unchanged, network/git/fzf bring-up
root/shell-project/ -- synced from space.seodr.ovh/
Daveswo/self-healing-autopoietic-
shell @ 3c4947e (main), plus three
deployment-only files not in that
repo: contrib/fx/builtin-fixes.txt,
contrib/fx/sources.d/15-builtin-
fixes.sh, contrib/heal/heal.sh
Verified byte-identical to what's actually embedded in the currently
shipping adaptiveos-v6.iso before this commit (full recursive diff),
and every .sh file passes `sh -n`.
.gitattributes (text=auto eol=lf) added to prevent the CRLF corruption
that hit the canonical repo earlier this session from recurring here.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
# heal(): thin observability wrapper around fx(). fx()/f() (see
|
||||
# ../fx/fx.sh, ../../src/f.sh) already do the actual healing across every
|
||||
# tier plus the manual "[LEARN] ... Enter a fix" fallback -- this adds
|
||||
# nothing to that logic. It only appends one structured line when every
|
||||
# tier AND the manual prompt come up empty, so an external caller or
|
||||
# orchestrator has something to grep for instead of only a bare nonzero
|
||||
# exit code.
|
||||
#
|
||||
# Usage:
|
||||
# . src/f.sh
|
||||
# . contrib/fx/fx.sh
|
||||
# . contrib/heal/heal.sh
|
||||
# heal some-command-that-might-fail --with args
|
||||
HEAL_LOG="${HEAL_LOG:-/var/log/glyphos-heal.log}"
|
||||
|
||||
heal() {
|
||||
if fx "$@"; then
|
||||
return 0
|
||||
fi
|
||||
ec=$?
|
||||
ts=$(date -u +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || echo unknown-time)
|
||||
printf '%s MISS cmd="%s"\n' "$ts" "$*" >> "$HEAL_LOG" 2>/dev/null
|
||||
return "$ec"
|
||||
}
|
||||
Reference in New Issue
Block a user