fix: harden release status checks#4
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughRejects the literal tag "latest" when deriving a release tag from asset URLs and rewrites lock acquisition in the release-check refresh: compute lock age, remove stale locks (with re-check), and create the lock with noclobber, returning early on contention. ChangesRelease-Check Robustness
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@bin/menutube.5s.sh`:
- Around line 332-333: The current stale-lock cleanup uses a previously computed
lock_age and unconditionally removes "${MENUTUBE_RELEASE_CHECK_CACHE}.lock",
which can delete a lock another process just created; change the logic so you
re-check the lock's age immediately before removal and only unlink if the
on-disk lock is still older than your stale threshold: after the atomic create
attempt (the ( set -C; : > "${MENUTUBE_RELEASE_CHECK_CACHE}.lock" ) ...), if
creation failed, inspect the lock file's current modification time (e.g. via
stat -c %Y or find -mmin) and compute its age relative to now (use the same
stale threshold as lock_age) and only rm -f
"${MENUTUBE_RELEASE_CHECK_CACHE}.lock" if that fresh check proves it is stale;
this ensures you won't remove a lock that another process just acquired.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
Summary
Validation
Summary by CodeRabbit