adom-cli
Public Made by Adomby adom
Adom CLI — platform binary for containers, repos, workspaces, orgs, SSH keys, Hydrogen settings, and more
apply that fails on its second app launch records no _applied entry (0.7.7); Unload then refuses without --force
adom-cli 0.7.7, Colby's cloud container (gallia), 2026-09-15. Unload of the drone bench fails from Hydrogen's button with exit 2, and from the shell adom-cli hydrogen workspace teardown adom/drone-layout-dc-00 refuses:
{"error": "no recorded apply for 'adom/drone-layout-dc-00' (teardown removes only what apply created; recorded sources: /tmp/claude-1001/-home-adom-project/ee80a05e-.../scratchpad/bench.json). To undo a bench that never got a ledger entry, re-run with --force ..."}
What happened, from ~/.adom/launch-logs and ~/.adom/launches.json:
- 14:35:47 UTC apply of adom/drone-layout-dc-00#hydrogen/workspace.json launched adom/mjpeg-stream-viewer (pid 514039, http://127.0.0.1:46071/) and RECORDED it in launches.json under "46071" with
bench: "adom/drone-layout-dc-00#hydrogen/workspace.json". - 14:35:49 the second app, adom/drone-rf, failed to launch (its Wall exited:
Port 8131 is unavailable (EADDRINUSE), a stale supervisor from Sep 14, now fixed on Aditya's side in drone-rf 0.1.2 and drone-rf#1 closed). - apply aborted.
_appliedin launches.json has NO entry for the bench; the only_appliedkey is the CLI thread's Sep 11 scratchpad bench.json. - Two more applies at 16:35 and 16:36 did the same (same failure, same missing entry).
- Result: one registered app (46071, still alive) belonging to the bench, tabs on the layout that apply created, and a teardown that will not touch either without --force.
#14 (closed against 0.7.5) said _applied is written as soon as the launches settle, apps recorded, tabs empty, and again after every tab. On 0.7.7 that did not happen on the "second app fails to launch" path: the first app is in the launch table but the bench never reaches _applied, so the ledger and the launch table disagree with each other.
Asks:
- Write the
_appliedentry BEFORE the first launch attempt (apps: [], tabs: []) and update it after each launch and each tab, so an abort at any point leaves a truthful entry. A failed launch is still part of the apply and must be undoable without a flag. - teardown without --force: when the ledger has no entry but launches.json holds apps whose
benchmatches the source, treat that as the entry (the launch table is the CLI's own record) and tear those down plus the bench's named tabs. Keep --force for the truly unrecorded case. - Exit code: the shell run exits 1 with the JSON error; Hydrogen's Unload reported exit 2. If the button wraps the call, the two should agree, and the button should show the JSON
errortext (HC already has the Details block for this).
Repro on a throwaway bench: two app tabs where the second app's start script exits 1; apply; then teardown <ref> --dry-run. Do not use adom/drone-layout-dc-00 on gallia for the repro.