Closed general

apply that ends with an unresolvable app records no _applied entry; teardown then fails and HC Unload exits 1

Colby Knox · 1mo ago ·closed by Colby Knox

Seen on gallia 2026-09-14 19:38 with the Hydrogen Cloud Apply button (adom-cli 0.7.3 at the time; the binary auto-updated to 0.7.4 at 19:40).

Sequence from ~/.adom/launch-logs and ~/.adom/launches.json:

  • 19:38:57 mjpeg-stream-viewer launched, printed http://127.0.0.1:45721/ (registered in launches.json at 19:38:58).
  • 19:38:59 drone-rf launched, log ends with "ERROR: the Wall did not answer within 90 s; see .../serve.log" (adom/drone-rf#1 again).
  • The live tree afterwards had Cam .35, Cam .34 and Drone RF Wall tabs, but _applied in launches.json never got an entry for adom/drone-layout-dc-00#hydrogen/workspace.json (only the old scratch bench.json entry remains).
  • adom-cli hydrogen workspace teardown adom/drone-layout-dc-00 therefore exits 1 with "no recorded apply", and HC's Unload button reports the process failed. The user is stuck with the bench and no way to unload it from the UI. I removed the panes and stopped the apps by hand.

Ask: record _applied (tabs, apps, displaced) as soon as the tabs exist, before or regardless of app launch outcomes, so a partial apply (one app unresolvable, timed out, or wedged) is always tear-down-able. On the same failure path, also make sure the tabs that did get created are the ones recorded, and that a later successful apply unions rather than replaces (0.7.2 note). A teardown --force <ref> that removes bench-named tabs and stops registered apps without a ledger entry would be a useful escape hatch for exactly this state.

1 Reply

Colby Knox · 1mo ago

Fixed in adom-cli 0.7.5, current latest 0.7.6 (wiki package 4.3.6).

What you asked for, in order:

  • The ledger no longer waits for the end of the build. _applied is written as soon as the launches settle (apps recorded, tabs empty) and again after every tab the build creates, union-merged with any standing entry (the 0.7.2 rule), so whatever exists at the moment an apply dies is exactly what the ledger says. An app that times out or wedges (drone-rf did it again during this test, adom/drone-rf#1) lands as a "(not available)" placeholder that IS recorded.
  • adom-cli hydrogen workspace teardown --force <ref|file> is the escape hatch for a bench with no ledger entry (an apply killed before recording, or one from a pre-0.7.5 build): it reads the bench file, removes the live tabs matching its names (the displayName plus the "(not available)" and "(not started)" forms, only those actually present), stops its apps the registry knows, clears their entries, and reports forced: true. The plain no-ledger refusal now names --force, so HC's Unload can retry with it when the first attempt exits 1.

Verified on gallia: apply -> ledger present with the three tabs and both apps; ledger entry deleted by hand to reproduce your state -> plain teardown refuses and names --force -> --force --dry-run plans the three tab removals and the app stop -> --force removed all three, stopped mjpeg-stream-viewer, left the VS Code pane alone; gallia back to the bare editor.

On the cause of the original miss (0.7.3): the ledger was the last step of apply, after the build and the header pass, so anything that ended the process between tab creation and that write left tabs with no record; the early and incremental writes close that window regardless of which step fails.

Log in to reply.