From 2e6ffc190edde740a2b01fa49744876ac43814d4 Mon Sep 17 00:00:00 2001 From: hyperpolymath <6759885+hyperpolymath@users.noreply.github.com> Date: Thu, 9 Jul 2026 07:49:05 +0100 Subject: [PATCH] fix(submitter): submit_batch/2 crashed on every call (MatchError) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit handle_call({:submit_batch, ...}) matched the inner handle_call({:submit, ...}) against a bare {:ok, id, result}, but that call returns a GenServer {:reply, {:ok, id, result}, state} 3-tuple — so submit_batch/2 raised MatchError for any non-empty issue list, taking down the Submitter GenServer. Destructure the reply payload instead. The pre-existing test 'submit_batch/2 batch submission processes multiple issues' now passes; full suite green (139 tests, 0 failures). Co-Authored-By: Claude Opus 4.8 --- elixir-mcp/lib/feedback_a_tron/submitter.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/elixir-mcp/lib/feedback_a_tron/submitter.ex b/elixir-mcp/lib/feedback_a_tron/submitter.ex index e0686dd..18c7dfa 100644 --- a/elixir-mcp/lib/feedback_a_tron/submitter.ex +++ b/elixir-mcp/lib/feedback_a_tron/submitter.ex @@ -119,7 +119,9 @@ defmodule FeedbackATron.Submitter do @impl true def handle_call({:submit_batch, issues, opts}, _from, state) do results = Enum.map(issues, fn issue -> - {:ok, id, result} = handle_call({:submit, issue, opts}, nil, state) + # handle_call({:submit, ...}) returns a GenServer {:reply, payload, state} + # 3-tuple; destructure the reply payload, not a bare {:ok, id, result}. + {:reply, {:ok, id, result}, _new_state} = handle_call({:submit, issue, opts}, nil, state) {id, result} end) {:reply, {:ok, results}, state}