Skip to content

isSubordinateResult() intercepts TASK_FAILED before processSubordinateFailure() #184

@mvillmow

Description

@mvillmow

ModuleLeadAgent::isSubordinateResult() returns true for any message with command == "response". TASK_FAILED messages also carry command == "response", so if the TASK_FAILED check in LeadAgentBase::processMessage() were ever reordered below the isSubordinateResult() check, failures would be silently treated as successes. The two checks are currently ordered correctly, but the coupling is fragile. Consider using command != "response" OR action_type == TASK_FAILED as the dispatch condition, or give TASK_FAILED messages a distinct command string (e.g. "failed").

Follow-up from #87

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrefactor

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions