Skip to content

fix: harden lifecycle checks and reduce redundant work - #203

Merged
jiminu merged 2 commits into
mainfrom
fix/lifecycle-and-test-audit
Sep 14, 2026
Merged

jiminu merged 2 commits into
mainfrom
fix/lifecycle-and-test-audit

Conversation

@jiminu

@jiminu jiminu commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Managed files replaced by same-content symlinks are now preserved as user replacements during install, status, and uninstall. Completion security audits run on first interactive use and rebuild both the dump and bytecode before retaining a daily clean-audit marker. Equal file counts cannot reuse unaudited registrations, failed cache generation leaves auditing enabled, and changed marker paths remain untouched. Status also checks developer configuration retained after switching to minimal.

  • Check every Bash/Zsh file individually instead of only the first syntax-check argument.
  • Consolidate duplicate test setup and assertions, remove incidental color/glyph/size expectations, and make semantic-version test failures propagate.
  • Buffer managed-block copies while preserving bytes, permissions, atomic replacement, and failure cleanup. Reuse one mise inventory per status/doctor invocation, and retain unchanged shell initialization caches while detecting tool replacement and rollback.
  • Remove redundant comments and correct stale explanations across configuration, tests, and shared code.

Validation: bash scripts/check.sh passed locally on macOS with Bash 3.2: 21 suites, 345 passing tests, no failures or skips. Focused regression tests cover user-path preservation, cache invalidation, inventory reuse, binary/CRLF/no-final-newline preservation, and injected copy failures.

Isolated macOS median measurements: 1 MiB block suffix removal improved from 1.54 s to 42 ms; six mise tool detections improved from 70 ms to 17 ms. Cached base shell startup remains about 13 ms. Cache identity uses filesystem metadata rather than hashing executables at startup; its same-second in-place-edit limitation is documented in docs/PERFORMANCE.md.

@jiminu
jiminu merged commit 8dc3576 into main Sep 14, 2026
7 checks passed
@jiminu
jiminu deleted the fix/lifecycle-and-test-audit branch September 14, 2026 09:36
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.

1 participant