install.sh: unknown flags silently ignored — --next from main/mosaicstack.dev installs @latest and reports success
#804
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Two compounding problems make the
--nextprerelease lane effectively unreachable via any documented install path, without ever surfacing an error.1. Unknown flags are silently discarded
tools/install.shonmainends its arg parser with:Any unrecognized flag is dropped with no warning and no non-zero exit.
2.
--nextonly exists on thenextbranch--next/MOSAIC_NEXTwere added in #686/#688 onnextonly. They are absent frommain's installer:They are likewise absent from an already-installed
~/.config/mosaic/install.sh(framework v3, CLI 0.0.48).Combined effect
silently drops
--next, installs @latest (0.0.48), and prints✔ Done.The user believes they installed the prerelease and got stable. Every retry looks like it succeeds.MOSAIC_NEXT=1fails the same way — main's installer never reads the var.Combined with #803 (mosaicstack.dev/install.sh returning 500), there is no documented path that reaches the next lane.
The lane itself is healthy — this is purely a bootstrap/UX defect:
Workaround
Bootstrap the installer from the
nextbranch directly:Verified working — installs CLI 0.0.49-next.1666 + gateway 0.0.7-next.1666.
Proposed fix
exit 1with usage, instead of*) shift ;;. Fix onnextand backport tomain: main's installer is the one users bootstrap from, so leaving it silent there preserves the bug for everyone regardless of whatnextdoes. This is the higher-value half of the fix — it converts an unfalsifiable failure into a one-line error.--nextliving only onnextmeans the documented path can structurally never reach the next lane. Either:main's installer to recognize--nextand re-exec thenextinstaller, orraw/branch/next/tools/install.shas the official next-lane bootstrap in the README +docs/design/prerelease-next-dist-tag-pipeline.md.Option (a) is preferable — it keeps a single advertised entry point and makes the lane discoverable rather than tribal knowledge.
Environment
Fedora Kinoite workstation, node v24.13.1, npm 11.8.0, framework v3, observed 2026-07-16.
Post-merge non-blocking backlog (from independent exact-head RoR of PR #825, VERDICT APPROVE — neither is a defect, neither blocked the merge):
--refvalue-guard message clarity (tools/install.sh): rejecting any--refvalue starting with-is a slightly blunt heuristic (a git ref can in contrived cases start with-, unrealistic for this project's branch naming), and the error reuses the generic "Unknown argument" wording rather than a--ref-specific message like "--refvalue looks like a flag." Message-clarity only.--ref-swallow) but not an explicit case for an unknown bare positional (e.g.justsomeword) — that path shares the same catch-all branch and was manually verified correct, but an explicit test would make coverage self-evident.Filed for a future low-priority follow-up; not required for the shipped fix.