Merge branch 'codex/work-folders-remote-recovery-refresh' into codex/work-folders-session-compat-refresh
* codex/work-folders-remote-recovery-refresh: test(recovery): isolate controller start evidence from host PID reuse
This commit is contained in:
commit
471359d010
|
|
@ -210,6 +210,7 @@ describe("native controller takeover fencing", () => {
|
|||
|
||||
it("does not let lease expiry bypass a live controller fence", async () => {
|
||||
const isProcessAlive = vi.fn(() => true);
|
||||
const readProcessStartedAt = vi.fn(async () => recordedStart);
|
||||
await expect(
|
||||
evaluateNativeControllerTakeover({
|
||||
owner: owner({
|
||||
|
|
@ -217,9 +218,11 @@ describe("native controller takeover fencing", () => {
|
|||
}),
|
||||
now,
|
||||
isProcessAlive,
|
||||
readProcessStartedAt,
|
||||
}),
|
||||
).resolves.toEqual({ allowed: false, reason: "controller_still_alive" });
|
||||
expect(isProcessAlive).toHaveBeenCalledWith(123);
|
||||
expect(readProcessStartedAt).toHaveBeenCalledWith(123);
|
||||
});
|
||||
|
||||
it("takes over an expired lease after proving the controller died", async () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue