From 411b67c7806932a861295fb584ab74acdb256c04 Mon Sep 17 00:00:00 2001 From: Aaron Queen Date: Sat, 10 Oct 2026 19:13:22 -0600 Subject: [PATCH] refactor: drop the earlier legacyQuiescent option name The installer that called stopRuntime now passes oldServersStopped, so the alias kept for the switch-over is removed. --- __tests__/runtime-control.test.ts | 5 ++--- site/src/content/docs/reference/api.md | 3 +-- src/runtime-control.ts | 5 ++--- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/__tests__/runtime-control.test.ts b/__tests__/runtime-control.test.ts index 1b18fa45f7..d6ec503af6 100644 --- a/__tests__/runtime-control.test.ts +++ b/__tests__/runtime-control.test.ts @@ -264,8 +264,7 @@ describe('runtime identity and readiness', () => { }, ); - it.each(['oldServersStopped', 'legacyQuiescent'] as const)( - 'preserves a legacy daemon by default, then stops it only after %s is set', async (option) => { + it('preserves a legacy daemon by default, then stops it only after oldServersStopped is set', async () => { const actor = spawn(process.execPath, [path.resolve(__dirname, 'fixtures/runtime-control-daemon.cjs'), root, getDaemonSocketPath(root), 'legacy', path.resolve(__dirname, '../dist/mcp/writer-lock.js')], { stdio: ['ignore', 'ignore', 'pipe', 'ipc'] }); @@ -276,7 +275,7 @@ describe('runtime identity and readiness', () => { expect(actor.exitCode).toBeNull(); expect(fs.readFileSync(getDaemonPidPath(root), 'utf8')).toBe(before); const exited = once(actor, 'exit'); - expect(await stopRuntime(root, { [option]: true })).toMatchObject({ pid: actor.pid, outcome: 'term' }); + expect(await stopRuntime(root, { oldServersStopped: true })).toMatchObject({ pid: actor.pid, outcome: 'term' }); await exited; const lease = reserveRuntimeWriter(root, process.pid); expect(lease).not.toBeNull(); diff --git a/site/src/content/docs/reference/api.md b/site/src/content/docs/reference/api.md index 9929b4dff1..71f018cdad 100644 --- a/site/src/content/docs/reference/api.md +++ b/site/src/content/docs/reference/api.md @@ -125,8 +125,7 @@ By default, stop preserves a live daemon without writer coordination protocol old-version MCP session and every direct or fallback writer for that project is stopped. The daemon serving the project is excluded because `stopRuntime` stops it. Daemon death alone does not establish that. A restored old-version daemon needs the -same explicit confirmation before another promotion. `{legacyQuiescent: true}` -is the earlier spelling of the same option. +same explicit confirmation before another promotion. Keep the reservation value unchanged. Its generation distinguishes successive reservations held by one PID. Claim it in the daemon bootstrap, then run the diff --git a/src/runtime-control.ts b/src/runtime-control.ts index 1cbc7f76b0..32e6d5c123 100644 --- a/src/runtime-control.ts +++ b/src/runtime-control.ts @@ -36,16 +36,15 @@ export async function getRuntimeIdentity(projectRoot: string, options: { timeout * Refuse live writers that predate the coordination protocol unless the caller * confirms every other old-version server for the project has been stopped. The * daemon this call stops is not part of that confirmation. - * `legacyQuiescent` is the earlier name for `oldServersStopped`. */ export async function stopRuntime( projectRoot: string, - options: { oldServersStopped?: boolean; legacyQuiescent?: boolean } = {}, + options: { oldServersStopped?: boolean } = {}, ): Promise { projectRoot = canonicalProjectRoot(projectRoot); return stopDaemonAt(projectRoot, { preserveUnverified: true, - requireWriterProtocol: !(options.oldServersStopped ?? options.legacyQuiescent), + requireWriterProtocol: !options.oldServersStopped, }); }