Skip to content

Fix stale WorkerLock source assertion in worker CLI smoke #3000

Description

@chubes4

Summary

The pure-PHP tests/worker-cli-smoke.php currently fails on main because it expects stale-lock implementation details to remain in inc/Cli/WorkerLock.php:

FAIL: worker lock identifies stale lock payloads during acquisition

WorkerLock now delegates stale lease detection and replacement to the generic OptionLeaseStore, so the expected stale comparison and direct delete_option( $option_name ) call are not present in WorkerLock on main.

Expected fix

Update the static smoke assertion to verify delegation to OptionLeaseStore::acquire() and keep behavioral stale replacement coverage in tests/worker-lock-smoke.php, which currently passes.

Scope

This was discovered while implementing #2889 and is intentionally not included in that dispatcher-health PR.

AI assistance

  • AI assistance: Yes
  • Tool: OpenCode
  • Used for: reproducing and isolating pre-existing smoke-test drift

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions