openclaw - 💡(How to fix) Fix [Feature]: Allow opt-in per-worktree heavy-check locks [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Allow high-capacity local development setups to opt into per-worktree heavy-check locks.

Root Cause

Disabling the lock entirely is weaker because it also allows competing heavy checks inside the same worktree.

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Summary

Allow high-capacity local development setups to opt into per-worktree heavy-check locks.

Problem to solve

Local heavy checks currently use the Git common dir for openclaw-local-checks/heavy-check.lock, so linked worktrees serialize pnpm check:changed and most pnpm test runs.

That default is safe, but it slows down operators who intentionally run independent checks across multiple worktrees on machines with enough CPU and memory.

Proposed solution

Keep the current repo-common lock as the default.

Add an explicit opt-in, for example:

OPENCLAW_HEAVY_CHECK_LOCK_SCOPE=worktree

When set, store the heavy-check lock under the current worktree, such as .artifacts/openclaw-local-checks/heavy-check.lock. This keeps each worktree internally serialized while allowing sibling worktrees to run independently.

Alternatives considered

Disabling the lock entirely is weaker because it also allows competing heavy checks inside the same worktree.

Changing the default lock scope is weaker because low-memory machines still need the current conservative protection.

Impact

Affected: operators running multiple local worktrees.

Severity: workflow friction, not a correctness bug.

Frequency: occurs whenever parallel local checks are run across linked worktrees.

Consequence: independent validation jobs wait on each other even when the host has enough resources.

Evidence/examples

pnpm check:changed and most non-tooling pnpm test runs acquire the local heavy-check lock. The lock path is based on git rev-parse --git-common-dir, which is shared by linked worktrees.

Related context: PR #78501 is tightening local heavy-check protection, so this request keeps the safe default and only adds an explicit opt-in.

Additional information

Non-goals:

  • Do not remove the default repo-common lock.
  • Do not change CI behavior.
  • Do not bypass Vitest cache isolation.
  • Do not reduce protection for low-memory local machines.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Feature]: Allow opt-in per-worktree heavy-check locks [1 pull requests]