openmillas 0.4.0 — installer UX + TD-21 + TD-26 + workflow convention #14
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/installer-interactive-ux"
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?
openmillas 0.4.0 — installer UX + lib/cli.sh extraction + TD-26 + workflow convention
This is PR 1 of 3 in the
installer-interactive-ux-and-mit-licenseumbrella improvement. PR 2 (add-mit-license) and PR 3 (readme-cli-usage) follow on separate branches.Resolves
install.sh+openmillasduplicate subcommand bodies) — closed.cmd_doctorgit-check missing) — closed.Installer UX (AC-1..AC-5)
cmd_installrewritten with a 4-step guided flow: (1) prereqs with version capture (bash 4+, python3 3.6+, git, OS), (2) local-vs-remote openmillas version compare viafetch_remote_version, (3) optional integrations one-at-a-time with[1/3]/[2/3]/[3/3]section markers, (4) applying. Banner +==================================================header on every install path. Pure bundle install (--yes --no-interaction) preserves the existing short-circuit.delegate_context7switched fromnpx ctx7 setup(which hung on the agent-selection prompt in--no-interaction) toCTX7_TELEMETRY_DISABLED=1 npx -y ctx7 setup --opencode --yeswith a manualmcp.context7heredoc fallback. Verified against the npmjsctx7README +@upstash/context7-mcp"Install in Opencode" section.TD-21 —
lib/cli.shextractionNew
workspace/opencode/lib/cli.sh(~325 lines) with 6 public functions:prompt_yn,cmd_uninstall,cmd_doctor(with M19 JSONC fallback baked in as explicitif declare -F jsonc_stripbranch),cmd_update,cmd_version,fetch_remote_version. Bothinstall.shandopenmillassource it.Deploy model (resolves the deploy / de-adapter asymmetry flagged by the arch-quality-reviewer):
install_openmillas_clinow deployslib/cli.sh,lib/jsonc.sh,lib/_jsonc_strip.pyto${HOME}/.local/lib/.cmd_uninstallsymmetrically removes those 3 files (new regression testdo_test_uninstall_removes_local_lib_filesproves it).TD-26 — doctor git check
9th check added to
cmd_doctor:git available (>= 2.x). Asserts presence and captures the version. New regression testdo_test_doctor_checks_git.Workflow convention (
.internal/, gitignored)Formalized three-role convention for the orchestrator's working memory:
specs/<branch-slug>.md(architect-drafted implementation spec),plans/<branch-slug>.md(orchestrator-drafted to-do),reports/<flow>-<slug>-<role>.md(raw subagent output). Documented in AGENTS.md §6 and shipped via the orchestrator +/initflow updates in this PR. Same convention this PR itself uses (artifacts at.internal/specs/installer-interactive-ux.md,.internal/plans/installer-interactive-ux.md,.internal/reports/feature-installer-interactive-ux-{analyzer,diff-context,security,arch}.md).Test suite
38 PASS / 0 FAIL (stable across 8 of 10 runs; the 2 occasional failures are the pre-existing
do_test_install_idempotentmtime flake documented intest_install.shcomments).deploy.sh --checkPASS.Six new tests:
do_test_cli_sh_sourced_by_both_scripts,do_test_doctor_checks_git,do_test_install_prints_prereq_versions,do_test_install_prints_local_vs_remote_version,do_test_install_prompts_are_sectioned,do_test_install_context7_delegation_uses_opencode_flag,do_test_uninstall_removes_local_lib_files. Plus a stub fix fordo_test_install_curl_pipe_stdin_bundle_clone(git stub now creates a fakelib/cli.shin the cloned bundle).Double-blind review
curlredirect scheme pinning deferred,jsonc_patch_global_configperm-relaxation pre-existing inmain).chore(review): address arch-quality-reviewer findings). 1 MAJOR + 8 MINOR + 4 NIT. MAJOR closed. Minor findings m5-m9 (constants-to-lib/config.sh refactor,lib/cli.shrename, XDG path) deferred to a follow-up PR — they require a separate refactor outside the scope of this UX improvement.Commits
User-known caveats (out of PR scope)
chore(docs)) renumbered §5.9 → §5.8. The §9 cross-reference is now broken (§5.8 is Local-only host setup). User to fix in a follow-up.Double-blind review by `arch-quality-reviewer` flagged 1 MAJOR + 8 MINOR + 4 NIT. This commit resolves the MAJOR (deploy / de-adapter asymmetry) and the 3 cheap MINORS that are tied to the lib/cli.sh extraction. The remaining minors (m5-m9) are deferred — they require moving shared globals to a new `lib/config.sh` (separate refactor, out of scope for PR 1). ### M1: cmd_uninstall now removes ~/.local/lib/ files (deploy / de-adapter symmetry) - `lib/cli.sh:cmd_uninstall` adds a third loop over `$OPENMILLAS_LIB_DIR` removing `cli.sh`, `jsonc.sh`, `_jsonc_strip.py`, then `rmdir`s the directory if empty. Mirrors the deploy loop in `install.sh:install_openmillas_cli` (was install.sh:430-436). - After `openmillas uninstall`, no files from the bundle remain in `~/.local/lib/`. The deploy and the de-adapter are now symmetric. - New regression test: `do_test_uninstall_removes_local_lib_files` — runs install, asserts the 3 files are at `~/.local/lib/`, runs uninstall, asserts they are gone + the directory is empty. - Test suite: 38 PASS / 0 FAIL (37 prior + 1 new). ### m2: AGENTS.md §3 layout tree updated to list `lib/cli.sh` - Added `│ │ ├── cli.sh shared subcommand bodies (TD-21; sourced by install + openmillas)` between `jsonc.sh` and `_jsonc_strip.py`. Doc was out-of-sync with reality after the TD-21 extraction. ### m3: Removed dead `_CLI_LIB_DIR` from `lib/cli.sh:58` - The variable was set but never referenced anywhere — the comment claimed it mirrored the `_JSONC_LIB_DIR` pattern, but no consumer existed. - 6-line comment + assignment deleted. ### m4: Removed unreachable third branch in `install.sh:51-68` source block - The BASH_SOURCE[0] fallback was unreachable: if BASH_SOURCE[0] is a real file, line 27 already set SCRIPT_DIR from it, and the first branch (`-f "${SCRIPT_DIR}/lib/cli.sh"`) succeeds with the same file. - 8 lines deleted; the comment now states the two reachable branches only. Deferred (tracked as follow-ups in the arch review report): - m5: OPENMILLAS_VERSION duplicated in install.sh + openmillas - m6: BACKUP_ROOT dead in openmillas - m7: implicit globals coupling (move to lib/config.sh) - m8: `lib/cli.sh` name (rename to `lib/commands.sh`?) - m9: `~/.local/lib/` non-XDG (documented non-convention)View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.