Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/coding-agent/test/daemon/unit-lifecycle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ describe.skipIf(process.platform === "win32")("daemon unit lifecycle", () => {
await first.close();

const second = await d.connect();
// scient(SA-DAEMON-REJOIN): begin - The client's close settles before the daemon handles it: rejoin once the daemon has dropped the lease.
await until(
async () => ((await second.describe("rejoin")).leases === 0 ? true : undefined),
"the dropped lease",
);
// scient(SA-DAEMON-REJOIN): end
const again = await second.openProc("rejoin", proc, { policy: { idleMs: 0 } });

expect(again.created).toBe(false);
Expand Down
11 changes: 11 additions & 0 deletions scripts/scient/divergences.json
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,17 @@
"verification": [
"bun --cwd=packages/coding-agent test test/scient/codex-plugins.test.ts test/scient/codex-plugins-oauth.test.ts test/scient/mcp-host-command.test.ts"
]
},
"SA-DAEMON-REJOIN": {
"status": "active",
"contract": "Oh My Pi's daemon test \"a client reconnecting within the grace adopts the same process\" reopens the unit only after describe shows the daemon dropped the closed connection's lease, as the grace test above it waits. The harness's close() settles when the client socket closes, before the daemon handles the close, so the open could be counted beside the stale lease (leases 2), which failed Scient's main on 2026-11-22. Test-only; the daemon's connection-bound lease accounting is unchanged. This inherited flake needs an upstream fix.",
"owned": [],
"upstream": [
"packages/coding-agent/test/daemon/unit-lifecycle.test.ts"
],
"verification": [
"bun --cwd=packages/coding-agent test test/daemon/unit-lifecycle.test.ts"
]
}
}
}
Loading