Skip to content

Commit 2e6ffc1

Browse files
hyperpolymathclaude
andcommitted
fix(submitter): submit_batch/2 crashed on every call (MatchError)
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 <noreply@anthropic.com>
1 parent f25df0a commit 2e6ffc1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

elixir-mcp/lib/feedback_a_tron/submitter.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ defmodule FeedbackATron.Submitter do
119119
@impl true
120120
def handle_call({:submit_batch, issues, opts}, _from, state) do
121121
results = Enum.map(issues, fn issue ->
122-
{:ok, id, result} = handle_call({:submit, issue, opts}, nil, state)
122+
# handle_call({:submit, ...}) returns a GenServer {:reply, payload, state}
123+
# 3-tuple; destructure the reply payload, not a bare {:ok, id, result}.
124+
{:reply, {:ok, id, result}, _new_state} = handle_call({:submit, issue, opts}, nil, state)
123125
{id, result}
124126
end)
125127
{:reply, {:ok, results}, state}

0 commit comments

Comments
 (0)