Skip to content

fix(checkpoints): remove stale shadow index locks - #45871

Closed
Veritas-7 wants to merge 1 commit into
NousResearch:mainfrom
Veritas-7:veritas/public-checkpoint-stale-index-lock-4bdde139
Closed

fix(checkpoints): remove stale shadow index locks#45871
Veritas-7 wants to merge 1 commit into
NousResearch:mainfrom
Veritas-7:veritas/public-checkpoint-stale-index-lock-4bdde139

Conversation

@Veritas-7

Copy link
Copy Markdown
Contributor

Summary

  • Remove stale checkpoint index .lock files before running git commands against per-project shadow indexes.
  • Preserve recent locks and locks that changed between stat checks to avoid deleting an active writer's lock.
  • Add regression coverage for stale removal, recent preservation, and replacement preservation.

Why

A stale index lock can leave Hermes checkpoints stuck even though no writer is active. Cleaning only old and unchanged lock files makes checkpoint recovery self-healing without weakening active-lock safety.

Tests

  • python -m pytest tests/tools/test_checkpoint_manager.py -q -o 'addopts='
  • gitleaks git --log-opts='origin/main..HEAD' --no-banner --redact
  • git diff --check origin/main..HEAD

Safety review

  • gpt-worker-2: PASS.
  • epistula: PASS; no private-path/secret/customer/family markers in diff-only scan.

@Veritas-7
Veritas-7 force-pushed the veritas/public-checkpoint-stale-index-lock-4bdde139 branch 2 times, most recently from e232e6e to 2d3ec5b Compare June 14, 2026 00:18
@Veritas-7

Copy link
Copy Markdown
Contributor Author

Closing this for now after the local two-reviewer gate found a remaining race window in stale index-lock cleanup. I will rework this into a safer follow-up before reopening/updating a replacement PR.

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