mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 11:13:43 +08:00
Two P0 fixes from ISSUE #413 — both address workflow await_approval approvals that silently failed in production: B1 — AwaitApprovalStepAdapter now dispatches the approval notice to every channel in approverChannels that carries a target. Previously approverChannels was write-only metadata: a workflow that declared ["feishu:oc_xxx"] silently dropped the notice and the IM group never learned an approval was waiting. Element format is "channelType" (no push, operator uses admin console) or "channelType:targetId". Each channel failure is logged and skipped — it must not fail the step. B2 — requestWorkflowApproval now registers the wf- approval into the in-memory map via registerRecovered. Previously it only did approvalMapper.insert, so getPending("wf-...") returned null, performResolve short-circuited at the not-pending guard, the WorkflowApprovalResolvedEvent was never published, and ApprovalResumeBridge was dead code. With this fix, resolving a wf- approval walks the full two-phase contract and the bridge fires. Tests: - WorkflowApprovalResumeBridgeTest (3): map registration, event publish on resolve, safe no-op for unregistered wf- ids. - AwaitApprovalNotifyTest (2): targeted channels dispatched, bare "web" skipped, channel failure non-fatal. Regression: ApprovalWorkflowServiceResolveTest (13), AwaitApprovalRuntimeTest (3), DispatchChannelRuntimeTest (3), GcTest (7), RecoveryTest (7) — all green. |
||
|---|---|---|
| .. | ||
| mode | ||
| AgentInvoker.java | ||
| AgentStepExecutor.java | ||
| ApprovalResumeBridge.java | ||
| ChannelDispatcher.java | ||
| DefaultAgentInvoker.java | ||
| DefaultChannelDispatcher.java | ||
| DefaultMemoryWriter.java | ||
| MemoryWriter.java | ||
| MergeStrategies.java | ||
| PayloadStore.java | ||
| StepAdapter.java | ||
| StepAdapterRegistry.java | ||
| StepResult.java | ||
| WorkflowCompletionEvent.java | ||
| WorkflowResumer.java | ||
| WorkflowRunContext.java | ||
| WorkflowRunner.java | ||
| WorkflowRunRequest.java | ||
| WorkflowRunResult.java | ||