Problem
Zi's reusable ZUnit matrix runs successfully against next, but the five current suites focus on annex, ice, package, plugin, and snippet installation. They do not lock down several user-visible compatibility contracts that regressed during the current promotion review:
z-shell/zi#368 restored zini, zinit, and zplugin, ZI[INTERNAL_ALIASES]=0, version detection, and the established zi update -L behavior.
z-shell/zi#370 restored documented compatibility helpers including zpcdreplay, zpcdclear, zpcompinit, zpcompdef, zpextract, and ❮▼❯.
z-shell/zi#372 restored the documented zi times -s behavior without breaking zi update -s.
All three fixes were merged to next on 2026-08-15 after manual promotion review. The existing zi_test helper already starts an isolated Zsh process, so most of these contracts can be tested without adding another framework.
This is not a request for an arbitrary coverage percentage. Zi is Git-consumed source, and these tests should target stable, externally observable behavior with demonstrated regression risk.
Proposed scope
Add a focused compatibility suite, for example tests/compat.zunit, covering:
- compatibility helpers are available after sourcing Zi and delegate to the intended implementation;
zini, zinit, and zplugin are present by default and absent only when ZI[INTERNAL_ALIASES]=0 is explicitly set;
zi -V, zi --version, and zi version report the checkout version consistently;
zi update -L remains accepted for plugins-only updates;
zi times -s, zi times -S, and zi times --seconds retain seconds behavior while zi update -s remains snippets-only.
Tests that would perform updates should use help/parse seams or deterministic fixtures rather than mutating live user state. Network-dependent annex behavior remains in the existing integration suites.
Acceptance criteria
Dependency
Immutable revision selection is already tracked by z-shell/zd#93. Test authoring can proceed in parallel, but the promotion gate should not treat the result as immutable until #93 is complete.
Problem
Zi's reusable ZUnit matrix runs successfully against
next, but the five current suites focus on annex, ice, package, plugin, and snippet installation. They do not lock down several user-visible compatibility contracts that regressed during the current promotion review:z-shell/zi#368restoredzini,zinit, andzplugin,ZI[INTERNAL_ALIASES]=0, version detection, and the establishedzi update -Lbehavior.z-shell/zi#370restored documented compatibility helpers includingzpcdreplay,zpcdclear,zpcompinit,zpcompdef,zpextract, and❮▼❯.z-shell/zi#372restored the documentedzi times -sbehavior without breakingzi update -s.All three fixes were merged to
nexton 2026-08-15 after manual promotion review. The existingzi_testhelper already starts an isolated Zsh process, so most of these contracts can be tested without adding another framework.This is not a request for an arbitrary coverage percentage. Zi is Git-consumed source, and these tests should target stable, externally observable behavior with demonstrated regression risk.
Proposed scope
Add a focused compatibility suite, for example
tests/compat.zunit, covering:zini,zinit, andzpluginare present by default and absent only whenZI[INTERNAL_ALIASES]=0is explicitly set;zi -V,zi --version, andzi versionreport the checkout version consistently;zi update -Lremains accepted for plugins-only updates;zi times -s,zi times -S, andzi times --secondsretain seconds behavior whilezi update -sremains snippets-only.Tests that would perform updates should use help/parse seams or deterministic fixtures rather than mutating live user state. Network-dependent annex behavior remains in the existing integration suites.
Acceptance criteria
z-shell/zi's integration workflow runs the suite against the exact revision under review afterz-shell/zd#93adds immutable SHA support.Dependency
Immutable revision selection is already tracked by
z-shell/zd#93. Test authoring can proceed in parallel, but the promotion gate should not treat the result as immutable until #93 is complete.