Documentation
¶
Overview ¶
Package projectlock owns the per-project critical section that serializes every Agent Layer read and mutation of skill sources with ordinary projection.
It was extracted from internal/sync so skill import operations and ordinary sync share one lock rather than each defining their own. The lock combines a per-process token (so goroutines in one binary serialize without relying on advisory-lock reentrancy) with an advisory flock on `.agent-layer/sync.lock` (so separate processes serialize too).
Index ¶
Constants ¶
const FileName = install.SyncLockFileName
FileName is sourced from internal/install (the package that owns the .agent-layer layout and its known-paths set) so the lock this package creates and the file the installer recognizes can never drift.
Variables ¶
var ( // ErrPostWriteCleanup identifies a fatal lock cleanup failure after the // locked section already completed its writes successfully. ErrPostWriteCleanup = errors.New("sync generated writes succeeded but post-write lock cleanup failed") )