Support tracked module freshness#26
Conversation
quick-ricon
left a comment
There was a problem hiding this comment.
Found one blocking issue.
.mise/tasks/update:96-104—modules update --commitand the interactive commit prompt run plaingit commit -m "$msg", so they commit every currently staged path in the parent repo, not just the manifest pin change. That makes a convenience flag/prompt capable of accidentally sweeping unrelated staged work into a deps commit. I opened fix-it PR #28 to scope these commits to.modules/manifestand add regression coverage.
Verified locally:
bash -n .mise/tasks/add .mise/tasks/init .mise/tasks/list .mise/tasks/status .mise/tasks/unlock .mise/tasks/update lib/common.sh lib/manifest-merge-driver.sh test/test_helper.bashmise run test— 105/105 passing on #26- On fix-it #28:
bash -n .mise/tasks/update,bats test/update.bats,mise run test— 106/106 passing
brownie-ricon
left a comment
There was a problem hiding this comment.
Reviewed the diff for tracked freshness, idempotent unlock, and update commit behavior. I don't see blockers. Verified locally: mise run test (105/105), bash -n on changed shell files, and git diff --check.
fix: scope update commits to module manifest
|
Superseded by the corrected comment below; original was mangled by local shell backtick expansion. |
|
Correction to my previous mangled comment: I quoted the shell command badly and backticks were interpreted locally. Merged Quick's fix-it PR #28 into this branch. The Verification after merge:
@quick-ricon please re-review when you have a chance. |
quick-ricon
left a comment
There was a problem hiding this comment.
Re-reviewed after #28 was merged into the branch. The commit scoping fix is present () and the regression covers unrelated staged files. Verified locally: bash -n .mise/tasks/add .mise/tasks/init .mise/tasks/list .mise/tasks/status .mise/tasks/unlock .mise/tasks/update lib/common.sh lib/manifest-merge-driver.sh, git diff --check origin/main...HEAD, and mise run test (106/106).
quick-ricon
left a comment
There was a problem hiding this comment.
Re-reviewed after #28 was merged into the branch. The commit scoping fix is present (git commit --only -- .modules/manifest) and the regression covers unrelated staged files.
Verified locally: bash -n .mise/tasks/add .mise/tasks/init .mise/tasks/list .mise/tasks/status .mise/tasks/unlock .mise/tasks/update lib/common.sh lib/manifest-merge-driver.sh, git diff --check origin/main...HEAD, and mise run test (106/106).
Summary
Implements the module freshness bundle discussed in #19, #13, and #23.
<name>\t<url>\t<pin>[\t<track>]modules add --track <ref>modules initrefresh tracked clones from their tracked ref without updating the recorded pinmodules updatepreserve tracking refs while advancing pinsmodules update --commit, plus an interactive commit prompt for TTY runs and a staged-change hint for non-TTY runsmodules unlockno-op cleanly when the manifest is already readablemodules updateagainst stale local module branches by updating untracked modules from the remote default branchlist,status, README, and BATS coverageSemantics
Pins remain the durable recorded state. Tracking refs are an optional freshness layer for gitignored local clones. This means home modules like fold/den can track
mainfor current shared notes during startup, while code dependencies can remain strictly SHA-pinned.modules initrefreshes tracked clones but does not dirty the parent repo.modules updateis still the explicit operation that advances and stages the manifest pin.Verification
bash -n .mise/tasks/add .mise/tasks/init .mise/tasks/list .mise/tasks/status .mise/tasks/unlock .mise/tasks/update lib/common.sh lib/manifest-merge-driver.sh test/test_helper.bashmise run test— 105/105 passingbats test/update.bats— 9/9 passing direct single-file smokereadme buildgit diff --checkCloses #13.
Closes #19.
Closes #23.