fix: harden pi maintenance lifecycle
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { existsSync } from "node:fs";
|
||||
|
||||
/**
|
||||
* A host-side lifecycle transaction creates this marker before it checks for active sessions.
|
||||
* The marker is intentionally only an admission gate: it must never terminate existing Pi
|
||||
* processes or make their in-flight work unavailable.
|
||||
*/
|
||||
export function createMaintenanceGate(markerFile: string): () => boolean {
|
||||
return () => existsSync(markerFile);
|
||||
}
|
||||
Reference in New Issue
Block a user