land: fork-lock-release

Merged
AF
4d ago
+192-32

Accepted agent delivery; branch-keyed search descriptor included.


Summary by cubic

Fixes AFT's internal file locks staying held after the owner releases them, because a forked child process can retain a duplicate descriptor until exec or exit. Maintenance operations like undo-history migration previously had to give up and retry; now locks are explicitly released via a new AdvisoryLockGuard when the protecting operation ends.

  • Applies the explicit-unlock guard to the backup namespace, session GC, manifest mutation, hook maintenance, root identity, check-cache, and broker-lease locks.
  • Adds Linux fork-based regression tests proving locks release even with a live duplicate descriptor.
  • No changes to migration policy or wait durations.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

Adds AdvisoryLockGuard to release file locks explicitly when protected work ends, even while a forked child retains a descriptor.

  • AFT file locks end when their operation ends, even after a fork.

Reviews (1) · Last reviewed commit: "release notes and search-quality descrip..." · Reviewed by Greptile