Skip to content

Document lock acquisition order for saveMu + subprocess hooks #7969

Description

@jongio

Context

Follow-up from PR #7776 (exegraph) review — wbreza Pass 3, finding M1.

Problem

\saveMu\ in \pkg/environment/manager.go\ serializes Save/Reload. Parallel hooks invoke \�zd env set\ subprocesses which acquire the same lock chain. With many concurrent hook goroutines, inconsistent acquisition ordering is theoretically possible.

Cross-process flock + in-process mutex ordering should be documented explicitly.

Acceptance Criteria

  • Add lock-acquisition order comments to \pkg/environment/manager.go\ documenting the \saveMu\ → flock ordering
  • Run \go test -race\ on hook-heavy templates to validate no races exist
  • Document which mutexes are held during subprocess invocations

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions