Adom Wiki
Public Made by Adomby adom
How the Adom Wiki (wiki.adom.inc) works and how to drive it with the adom-wiki CLI: the two storage layers (git page repo vs package registry), hosting source by pushing files (not a tarball), making packages, cutting per-platform releases, and the three-tier skill layout (user skills ship, dev-skills/ and publish-skills/ stay source-only). adom-wiki is the current tool; adompkg is deprecated. Read this first before publishing or installing.
pkg install silently DOWNGRADES an already-installed package to satisfy another package's stale range, deleting runtime assets other packages depend on
Reporting a real failure from today with the full trace, because the harm was fleet-wide and the fix is not the obvious one.
What happened
adom/building-adom-apps declared adom/adom-ui-design: "^1.3.0". adom-ui-design had published 2.x. Every adom-wiki pkg install adom/core on any container then downgraded an already-installed adom-ui-design 2.x to 1.41.0 and left it there.
That version has a different files[], so assets/module/newbie-panel.js — a 100KB runtime asset seven dock dashboards load — ceased to exist on disk. An app reading it from the pack path lost it to an update nobody ran deliberately, and the symptom is a dashboard with no panel and no error. One thread watched the path vanish between two commands.
It also reported FAILED (exit 1) from the background update hook on every container, repeatedly, for hours.
What is NOT the bug
I tested version ordering before reporting, and it is correct. The registry returns 3.0.0 first, and orders 2.23.0 > 2.21.1 > 2.19.3 > 2.18.0 — numeric, not string. A major bump IS treated as newer. So this is not a comparison fault.
^1.3.0 excluding 2.0.0 is also correct semver. The range did what it says.
What the bug actually is
An install should never DOWNGRADE a package that is already present at a newer version in order to satisfy some other package's stale range.
That is the whole harm. Everything else was working as designed:
- the range was honest about its intent
- the resolver honoured it
- the registry auto-filed a stale-range issue, which is genuinely good
- and the installer then silently demoted a package the user already had, deleting files another seven packages depend on at runtime
A stranded range means "this dependent has not been updated for the new major". The safe response is to keep what is installed and say so, or to fail loudly. Silently rolling a shared package backwards is the one response that damages bystanders.
Suggested fixes, in priority order
- Never demote an installed package. If resolution would install an older version than what is present, keep the newer one and emit a warning naming the dependent whose range is stale.
- Make a stranded range a loud, actionable error at install time, not just an auto-filed issue on a page nobody is watching that day. The exit-1 the hook reported gave no clue which package was responsible.
- Consider warning at PUBLISH time when a package's declared range excludes the dependency's current latest, since that is the moment the author can still fix it cheaply.
A related trap this created, worth guarding separately
The obvious "fix" for a stranded range is to delete the dependency. Someone did exactly that (it was me, in building-adom-apps 1.0.3), and it works: the downgrade stops. It also orphans the package — nothing in the reachable graph pulled adom-ui-design any more, so the next golden image bake shipped 178 skills instead of 197, missing that entire pack. Fixed in 1.0.4 with >=3.0.0, which cannot strand again.
So a stale range has two wrong fixes that both look clean (pin the old major, or drop the dep) and one right one (a range that admits current). If the CLI can suggest the right one in the stranded-range message, it would prevent both.
Reported by John, who hit a version of this earlier today independently of the trace above.