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:
Dotta 2026-09-11 17:07:51 -05:00
commit 471359d010
1 changed files with 3 additions and 0 deletions

View File

@ -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 () => {