Skip to content

Use native process identities for PID-managed daemons - #45779

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/b5752497c0e8186bb604fe5dd33f570acc068f20
Sep 15, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/b5752497c0e8186bb604fe5dd33f570acc068f20

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Use native process identities for PID-managed daemons

Why

Locale, timezone, or system clock changes can alter the ps start-time text used to identify a running daemon, causing its PID record to be treated as stale.

What changed

  • Record and check native process identities on Linux and macOS, using boot IDs to reject records from previous boots and native process details to detect PID reuse.
  • Keep processStartTime for older clients and promote verifiable legacy daemon and updater records when the updater starts.
  • Retain legacy records and report an error when a live process's start-time text no longer matches. Propagate Windows process-access errors instead of treating inaccessible PIDs as stale.

Testing

Add regression coverage for locale and timezone changes, altered legacy timestamps, legacy record promotion, PID reuse, previous boots, and macOS process ownership differences. Extend zombie-reaping coverage to native identities and verify that Windows access-denied errors are preserved.

## Why

Locale, timezone, or system clock changes can alter the `ps` start-time text used to identify a running daemon, causing its PID record to be treated as stale.

## What changed

- Record and check native process identities on Linux and macOS, using boot IDs to reject records from previous boots and native process details to detect PID reuse.
- Keep `processStartTime` for older clients and promote verifiable legacy daemon and updater records when the updater starts.
- Retain legacy records and report an error when a live process's start-time text no longer matches. Propagate Windows process-access errors instead of treating inaccessible PIDs as stale.

## Testing

Add regression coverage for locale and timezone changes, altered legacy timestamps, legacy record promotion, PID reuse, previous boots, and macOS process ownership differences. Extend zombie-reaping coverage to native identities and verify that Windows access-denied errors are preserved.

GitOrigin-RevId: b5752497c0e8186bb604fe5dd33f570acc068f20
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/b5752497c0e8186bb604fe5dd33f570acc068f20 branch from 1a8f5c4 to c031629 Compare September 15, 2026 19:46
@copyberry
copyberry Bot merged commit c031629 into main Sep 15, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/b5752497c0e8186bb604fe5dd33f570acc068f20 branch September 15, 2026 19:46
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant