Skip to content

fix(agents): fix failure propagation in lead agent dispatch chain#467

Merged
mvillmow merged 2 commits into
mainfrom
lead-agent-failures
Apr 26, 2026
Merged

fix(agents): fix failure propagation in lead agent dispatch chain#467
mvillmow merged 2 commits into
mainfrom
lead-agent-failures

Conversation

@mvillmow
Copy link
Copy Markdown
Collaborator

Summary

Test plan

Closes #184
Closes #185
Closes #186

🤖 Generated with Claude Code

@mvillmow mvillmow enabled auto-merge (rebase) April 26, 2026 00:39
@github-actions
Copy link
Copy Markdown

✅ Dependency Audit

Severity Count
Critical 0
High 0
Medium 0
Low 0

See the Security tab for detailed findings.


Workflow: Dependency Audit

@github-actions
Copy link
Copy Markdown

Security Scan Results

  • ❌ Secret Scanning: Potential secrets found
  • ✅ SAST: Completed (check Security tab for details)
  • ✅ Dependency Scanning: Completed
  • ✅ C++ Static Analysis: Completed
  • ✅ Docker Image Scanning: 0 high, 22 medium vulnerabilities (acceptable)

Recommendations

  • Review findings in the GitHub Security tab
  • Check artifact uploads for detailed reports
  • Address critical Docker vulnerabilities immediately

Workflow: Security Scanning

@mvillmow mvillmow force-pushed the lead-agent-failures branch 3 times, most recently from 368fad3 to 2f29039 Compare April 26, 2026 18:32
@mvillmow mvillmow disabled auto-merge April 26, 2026 19:00
@mvillmow mvillmow enabled auto-merge (squash) April 26, 2026 19:00
@mvillmow mvillmow force-pushed the lead-agent-failures branch from 339dd48 to ac70c80 Compare April 26, 2026 22:00
- isSubordinateResult() (ModuleLeadAgent) now explicitly excludes
  TASK_FAILED messages so they always reach processSubordinateFailure()
  and are never silently treated as successes (Closes #184).

- processSubordinateFailure() (LeadAgentBase default) now sends a
  TASK_FAILED message to coordination_.getRequesterId() once all
  subordinates have reported terminal events, preventing the
  ComponentLeadAgent from remaining stuck in WAITING_FOR_MODULES
  permanently (Closes #185).

- Added processTaskResult() to ModuleLeadAgent and ComponentLeadAgent
  for the gRPC async result path; calls coordination_.recordFailure()
  when hmas::TaskResult::success() is false so hasFailures() is set
  correctly and upward propagation fires (Closes #186).

- Added unit tests covering all three scenarios, including a three-
  level integration test that verifies TASK_FAILED arrives at the
  grandparent inbox.

Closes #184
Closes #185
Closes #186

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mvillmow mvillmow force-pushed the lead-agent-failures branch from ac70c80 to 548b8dc Compare April 26, 2026 22:39
Two bugs:
1. processSubordinateResult() transitioned to SYNTHESIZING even when
   prior failures existed — missing hasFailures() check. Now transitions
   to ERROR when all subtasks complete but any failed (mirrors gRPC path).

2. FailurePropagatedUpwardToRequester test sent module goal from 'chief'
   instead of 'component_1', so requester_id_ was set to an unregistered
   agent and the upward TASK_FAILED was silently dropped.

Closes #184 #185 #186

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mvillmow mvillmow merged commit f9bd469 into main Apr 26, 2026
16 checks passed
@mvillmow mvillmow deleted the lead-agent-failures branch April 26, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant