Skip to content

release: bundle niugit/ripgrep/fd into the pre-install manifest (closes #209) - #230

Merged
caomengxuan666 merged 1 commit into
masterfrom
ci/bundle-niugit-rg-fd
Oct 9, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
ci/bundle-niugit-rg-fd

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Closes #209.

What

Extends the #189 manifest-driven release pre-install to the #209 must-install bundle: niugit, ripgrep (rg) and fd join gawk in scripts/release/preinstall.json. The existing workflow plumbing (install -> shims -> verify) is already fully manifest-driven, so this is a manifest + disclosure change - no new workflow mechanics.

Why

niu setup with the full plugin distro fails all five entries (oh-my-bash, omb-theme-robbyrussell, bash-it, bash-completion, bash-preexec) with failed to run git; is git.exe on PATH? on any machine without git. Bundling niugit at CI time removes the hard dependency on the user's environment while keeping the 'niu downloads no binaries at runtime' policy intact: the assembly happens here, in release CI.

Red lines honored

  • No archive formats added; payloads land in the wpm package layout (<root>\opt\<pkg>\ + usr\bin shims).
  • No symbolic links - shims are winuxcmd.exe hardlinks (copies on file systems without hardlink support).
  • No runtime downloads; the wpm JSON manifest is the single source of truth.

Details

  • niugit: whole niu-git tree (git.exe + mingw64/ with its minimal dependency DLLs + etc/) into opt\niugit; command git registered. x64-only in the wpm index.
  • ripgrep / fd: static single-exe payloads; the index carries windows-arm64 artifacts for both, so unlike niugit/gawk they pre-install on the ARM64 leg too. The release body now discloses this per-leg caveat.
  • tests/preinstall_manifest.rs gains must_install_bundle_is_present, pinning all four packages as a contract.

Verification

  • Local: manifest JSON schema/names/shim/exclusion policy validated; cargo test --test preinstall_manifest 5/5 green; cargo fmt clean.
  • CI artifact verification (git/rg/fd --version inside the staged package) is enforced by the existing verify step (shimNames = manifest packages + shims) - pending the next release run, per the fail-open policy there.

#209)

Extend the #189 manifest-driven pre-install to the #209 must-install
bundle: niugit (so 'niu setup' full distro no longer 5-fails on a
gitless machine), ripgrep and fd, alongside gawk. Manifest-only change
- the workflow's install/shim/verify plumbing is already generic and
manifest-driven. No archive formats, no symlinks (hardlink shims only),
no runtime downloads: assembly stays in CI.

- scripts/release/preinstall.json: add niugit/ripgrep/fd entries with
  purposes, update the architecture note (ripgrep/fd carry arm64
  artifacts and pre-install on both legs; niugit/gawk are x64-only)
- tests/preinstall_manifest.rs: pin the four-package must-install
  bundle as a contract
- release.yml: release body + step comment now disclose the bundle and
  the per-leg arm64 caveat

CI artifact verification (usr/bin/git.exe, rg.exe, fd.exe in the
staged package, --version smoke) is enforced by the existing verify
step and lands with the next release run.
@caomengxuan666
caomengxuan666 merged commit c6aeece into master Oct 9, 2026
8 of 9 checks passed
@caomengxuan666
caomengxuan666 deleted the ci/bundle-niugit-rg-fd branch October 9, 2026 12:59
caomengxuan666 added a commit that referenced this pull request Oct 9, 2026
)

* release: bundle niugit/ripgrep/fd into the pre-install manifest (closes #209)

Extend the #189 manifest-driven pre-install to the #209 must-install
bundle: niugit (so 'niu setup' full distro no longer 5-fails on a
gitless machine), ripgrep and fd, alongside gawk. Manifest-only change
- the workflow's install/shim/verify plumbing is already generic and
manifest-driven. No archive formats, no symlinks (hardlink shims only),
no runtime downloads: assembly stays in CI.

- scripts/release/preinstall.json: add niugit/ripgrep/fd entries with
  purposes, update the architecture note (ripgrep/fd carry arm64
  artifacts and pre-install on both legs; niugit/gawk are x64-only)
- tests/preinstall_manifest.rs: pin the four-package must-install
  bundle as a contract
- release.yml: release body + step comment now disclose the bundle and
  the per-leg arm64 caveat

CI artifact verification (usr/bin/git.exe, rg.exe, fd.exe in the
staged package, --version smoke) is enforced by the existing verify
step and lands with the next release run.

* setup: treat release-bundled components as present (follows #230)

The release bundle (scripts/release/preinstall.json, #230/#209) ships
gawk, niugit, ripgrep and fd into the winuxcmd tree as opt/<pkg>
payloads plus usr/bin winuxcmd.exe shims. The setup wizard and doctor
now count an existing payload or shim as present, so a bundled
component is never reported missing, never re-recommended for install,
and its aliases still expand:

- bundled detection over the winuxcmd installation root (opt payload
  OR usr/bin shim, fail-open); EnvProbe annotates tool sources, and
  the environment summary labels bundled tools '(...)' plus a bundle
  row naming the packages actually shipped;
- the Windows-only niu-git question is skipped and recorded as
  'installed' when opt/niugit or the git shim is already there;
- 'niu doctor' gains an advisory 'bundled tools' row with the honest
  source label (bundled vs system, none when the leg shipped without).

Tests: payload/shim/missing/None detection, probe satisfaction and
label non-shadowing, niu-git skip vs. still-offered, doctor row truth.

---------

Co-authored-by: caomengxuan666 <[email protected]>
caomengxuan666 added a commit that referenced this pull request Oct 10, 2026
- Delete docs/eco-harvest-resume-wt97b.md: point-in-time lane resume/handoff snapshot; the harvest/test line now runs on GitHub Actions (eco-harvest-ci.yml) and the diagnosis lives in git history.
- CHANGELOG: add Unreleased entries for strip (#228), setup help/non-tty banner (#229), bundled niugit/ripgrep/fd + setup detection (#230/#231), PROMPT_COMMAND exit jump (#232), PS0 stderr (#233), bracketed paste (#234).

Co-authored-by: docs-audit <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Niubash 出场必装 niugit/rg/fd:以 wpm JSON 包在 CI 阶段完成装配(enhancement)

1 participant