Skip to content

Async runner counts rejected HTTP responses as accepted #453

Description

@chubes4

Problem

WP_Agent_Workflow_Action_Scheduler_Branch_Executor::trigger_async_runner() increments its accepted-loopback count for every WpOrg\Requests\Response, regardless of HTTP status. A proxy or origin rejection such as 403 therefore returns 1 even though the Action Scheduler queue runner never executes and the action remains pending with zero attempts.

Expected

Only successful queue-runner HTTP responses count as accepted dispatches. Rejected responses return zero so callers can select another server-side worker path and diagnostics remain truthful.

Reproduction

  1. Stub Requests::request_multiple() to return a Response with status 403.
  2. Call trigger_async_runner( 1 ).
  3. Observe the method currently returns 1.
  4. Verify the corrected method returns 0, while a successful 2xx queue-runner response returns 1.

This was discovered while tracing an Action Scheduler action that remained pending with zero attempts on a protected split runtime.

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