Skip to content

Promote live file-lock safety fix - #42

Merged
slate-rehm merged 2 commits into
masterfrom
dev
Aug 8, 2026
Merged

Promote live file-lock safety fix#42
slate-rehm merged 2 commits into
masterfrom
dev

Conversation

@slate-rehm

@slate-rehm slate-rehm commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Promote the release-blocking file-lock safety fix to production.

  • Preserve verified live local lock owners regardless of age.
  • Protect fresh incomplete lock records during creation.
  • Reclaim unverifiable records only after stale filesystem mtime.
  • Add regression coverage for the release failure.

Verification

  • CI passed on Node 20, 22, and 24.
  • Package and install check passed.
  • Macroscope and CodeRabbit checks passed.
  • File-lock suite passed 50 consecutive local runs.

Release failure fixed: https://github.com/bearfire-dev/knapper/actions/runs/31281955481

Note

Fix live file-lock staleness check to avoid breaking locks with living processes

  • Rewrites isStale in filelock.ts so a lock held by a running same-host process is never broken based on age — it only breaks when isAlive confirms the process is gone.
  • Unreadable or partial lock files fall back to mtime-based staleness (via stat().mtimeMs) rather than being broken immediately.
  • Locks from other hostnames are never broken regardless of age or content.
  • Behavioral Change: previously, any sufficiently old lock record could be broken; now age alone is not enough for same-host locks with a valid pid.

Macroscope summarized 534c354.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@slate-rehm, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e96b2adc-4d20-4cc4-937a-2e23becf0ae5

📥 Commits

Reviewing files that changed from the base of the PR and between 403683a and 534c354.

📒 Files selected for processing (2)
  • src/util/filelock.ts
  • tests/unit/filelock.test.ts

Comment @coderabbitai help to get the list of available commands.

@slate-rehm

Copy link
Copy Markdown
Collaborator Author

#AI-Automation

  • Promoted the release-blocking file-lock race fix.
  • Verified Node 20, 22, and 24 CI twice through the dev and production promotion workflows.
  • Verified both package-install jobs.
  • Macroscope passed.
  • CodeRabbit reported rate limiting and did not post new findings.
  • The file-lock suite passed 50 consecutive local runs.

@slate-rehm
slate-rehm merged commit e07c12a into master Aug 8, 2026
10 checks passed
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