bootstrap
Adom Hydrogen (platform base)
Public Made by Adomby adom
Layer Hydrogen's workspace onto a standard Adom workstation.
← Commit history
migrate-retired-slugs.sh+46−17@@ -58,6 +58,20 @@ while IFS=: read -r old new; do " done <<< "$TABLE" +# Nested `pkg install` DEADLOCKS when this script runs inside the CLI's own+# install (the CLI holds the install lock while running postinstall — verified+# live 2026-08-13: the first migration attempt hung on it). Every nested call+# is timeout-bounded; a timeout on the FIRST one means the lock is held above+# us — defer the whole migration to the next STANDALONE postinstall run (ah's+# update-packages step re-runs postinstall explicitly, lock-free).+LOCK_BUSY=0+inst() { # inst <ref> -> 0 installed/present, 1 failed, sets LOCK_BUSY on timeout+ timeout 120 "$WIKI" pkg install "$1" >/dev/null 2>&1+ local rc=$?+ [ "$rc" = "124" ] && LOCK_BUSY=1+ return $rc+}+ if [ -z "$PRESENT" ]; then mlog "clean: no retired slugs present" exit 0@@ -65,38 +79,53 @@ fi # ── Phase 1: install every successor (ALL installs happen before ANY removal, # so the resurrect-on-install bug can't undo phase 2/3).+SECURED="" while IFS=: read -r old new; do [ -n "$old" ] || continue mlog "MIGRATING $old -> ${new:-'(absorbed into adom/adom)'}"- if [ -n "$new" ]; then- "$WIKI" pkg install "$new" >/dev/null 2>&1 \- && mlog " installed successor $new" \- || mlog " ⚠ could not install $new (will still remove $old; re-run heals)"+ if [ -z "$new" ]; then+ SECURED="$SECURED$old+"+ continue+ fi+ if has_pkg "$new"; then+ mlog " successor $new already present"+ SECURED="$SECURED$old+"+ elif inst "$new"; then+ mlog " installed successor $new"+ SECURED="$SECURED$old+"+ else+ mlog " ⚠ could not install $new — KEEPING $old (re-run heals)"+ if [ "$LOCK_BUSY" = "1" ]; then+ mlog "DEFERRED: install lock held above us (running inside pkg install?); next standalone postinstall completes this"+ exit 0+ fi fi done <<< "$PRESENT" # The absorbed-skill case: adom/adom (the hub) owns adom-workspace-control's # skill now — re-install it so the shared skill file survives phase 2's prune. if echo "$PRESENT" | grep -q "adom/adom-workspace-control" && has_pkg "adom/adom"; then- "$WIKI" pkg install "adom/adom" >/dev/null 2>&1 \+ inst "adom/adom" \ && mlog " re-installed adom/adom (owns the absorbed workspace-control skill)" fi # ── Phase 2: uninstall the retired refs (registry-independent; may fail on # ghosts — phase 3 purges whatever this leaves).-while IFS=: read -r old new; do+while IFS= read -r old; do [ -n "$old" ] || continue- "$WIKI" pkg uninstall "$old" >/dev/null 2>&1 \+ timeout 60 "$WIKI" pkg uninstall "$old" >/dev/null 2>&1 \ && mlog " removed $old" \ || mlog " (uninstall of $old refused; purging from lockfile directly)"-done <<< "$PRESENT"+done <<< "$SECURED" # ── Phase 3: purge residue from packages/resolved/order so no later install # can resurrect the retired refs.-python3 - "$LOCK" <<'PY'-import json, sys-RETIRED = {"adom/hd-bootstrap","adom/hd-windows-bootstrap","adom/hd-mac-bootstrap",- "adom/adom-desktop","adom/step2glb","adom/adom-theme-system",- "adom/adom-workspace-control"}+SECURED_CSV=$(echo "$SECURED" | grep -v '^$' | paste -sd, -)+SECURED_REFS="$SECURED_CSV" python3 - "$LOCK" <<'PY'+import json, os, sys+RETIRED = set((os.environ.get("SECURED_REFS") or "").split(",")) - {""} path = sys.argv[1] d = json.load(open(path)) removed = []@@ -121,10 +150,10 @@ PY # the ghost path doesn't). Delivered ~/.claude/skills files are deliberately # LEFT alone: deleting by name could hit a file the successor now owns — the # successor installs above already overwrote every shared name.-while IFS=: read -r old new; do+while IFS= read -r old; do [ -n "$old" ] || continue [ -d "$MOD/$old" ] && rm -rf "$MOD/$old" 2>/dev/null && mlog " removed module dir $old"-done <<< "$PRESENT"+done <<< "$SECURED" # ── Phase 4: verify every successor's delivered skills exist on disk; one # re-install heals a collateral prune (safe now: retired refs are purged, so@@ -141,11 +170,11 @@ for ref in adom/hydrogen-bootstrap adom/hydrogen-windows-bootstrap adom/hydrogen done if [ "$missing" = "1" ]; then mlog " re-installing $ref to re-deliver missing skills"- "$WIKI" pkg install "$ref" >/dev/null 2>&1 || mlog " ⚠ re-install of $ref failed"+ inst "$ref" || mlog " ⚠ re-install of $ref failed (heals on next standalone run)" fi done -N=$(echo "$PRESENT" | grep -c ":" || true)+N=$(echo "$SECURED" | grep -c . || true) mkdir -p "$HOME/.adom" 2>/dev/null echo "{\"version\":1,\"migrated\":$N,\"at\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"}" > "$HOME/.adom/slug-migration.json" 2>/dev/null mlog "DONE: $N retired slug(s) migrated"
package.json+1−1@@ -4,7 +4,7 @@ "type": "bootstrap", "title": "Adom Hydrogen (platform base)", "brief": "Layer Hydrogen's workspace onto a standard Adom workstation.",- "version": "0.3.16",+ "version": "0.3.17", "description": "Hydrogen's PLATFORM-GENERIC workspace layer on top of adom/core. Installs adom/core for the full Adom ecosystem, then adds everything common to running inside Hydrogen on ANY platform: the runtime-neutral hydrogen-* skills and the generic editor configuration (Claude Code CLI + extension, VS Code settings, trusted domains). Platform-specific layers depend on THIS: adom/hydrogen-windows-bootstrap (WSL2), adom/hydrogen-mac-bootstrap, adom/hydrogen-ubuntu-bootstrap. The reference design other orgs copy to build their own bootstrap on adom/core.", "org": "adom", "platform": "any",
page.json+1−1@@ -4,7 +4,7 @@ "type": "bootstrap", "title": "Adom Hydrogen (platform base)", "brief": "Layer Hydrogen's workspace onto a standard Adom workstation.",- "version": "0.3.16",+ "version": "0.3.17", "description": "Hydrogen's PLATFORM-GENERIC workspace layer on top of adom/core. Installs adom/core for the full Adom ecosystem, then adds everything common to running inside Hydrogen on ANY platform: the runtime-neutral hydrogen-* skills and the generic editor configuration (Claude Code CLI + extension, VS Code settings, trusted domains). Platform-specific layers depend on THIS: adom/hydrogen-windows-bootstrap (WSL2), adom/hydrogen-mac-bootstrap, adom/hydrogen-ubuntu-bootstrap. The reference design other orgs copy to build their own bootstrap on adom/core.", "org": "adom", "tags": [