Use a stable workspace lock for coordination
This commit is contained in:
@@ -32,7 +32,6 @@ type SessionPaths struct {
|
||||
PreviousManifestPath string
|
||||
PreviousArtifactsDir string
|
||||
ManifestPath string
|
||||
LockPath string
|
||||
RestoreMarkerPath string
|
||||
}
|
||||
|
||||
@@ -41,6 +40,11 @@ func SessionInvocationProbeDir(paths SessionPaths, runID, application string) st
|
||||
return filepath.Join(paths.RunsDir, ".preflight", runID, application)
|
||||
}
|
||||
|
||||
// WorkspaceLockPath returns the stable coordination file outside the work tree.
|
||||
func WorkspaceLockPath(rootDir string) string {
|
||||
return filepath.Join(rootDir, config.PathLockFile)
|
||||
}
|
||||
|
||||
// SessionWorkDirForCampaign returns the canonical campaign-aware work directory for one session.
|
||||
func SessionWorkDirForCampaign(rootDir, campaign, sessionID string) string {
|
||||
return filepath.Join(rootDir, config.PathWorkDirSegment, campaign, sessionID)
|
||||
@@ -246,7 +250,6 @@ func buildSessionPathsFromRoot(workspaceRoot, campaign, sessionID, root string)
|
||||
PreviousManifestPath: filepath.Join(root, config.PathInputsDirSegment, config.PathPreviousDirSegment, config.PathManifestFile),
|
||||
PreviousArtifactsDir: filepath.Join(root, config.PathInputsDirSegment, config.PathPreviousDirSegment, config.PathArtifactsDirSegment),
|
||||
ManifestPath: filepath.Join(root, config.PathManifestFile),
|
||||
LockPath: filepath.Join(root, config.PathLockFile),
|
||||
RestoreMarkerPath: filepath.Join(root, ".restore-incomplete.json"),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user