MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / TurnPublicationLock

Class TurnPublicationLock

atomic-cli/src/commands/agent/hooks.rs:507–507  ·  view source on GitHub ↗

Cross-process publication coordination for terminal hooks. The orchestrator acquires the same `turn-publication.lock` inside `handle_turn_end`; acquiring it HERE (before the workspace boundary guard) mirrors the dev-sync ordering: a Stop blocked on a transient writer must still be observable as holding its publication lock, and a killed Stop must release it by process death alone.

Source from the content-addressed store, hash-verified

505/// writer must still be observable as holding its publication lock, and a
506/// killed Stop must release it by process death alone.
507pub(crate) struct TurnPublicationLock(std::fs::File);
508pub(crate) fn hold_turn_publication_lock(
509 repository_root: &std::path::Path,
510) -> CliResult<Option<TurnPublicationLock>> {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected