Commit e20a24b
fix(submitter): submit_batch/2 crashed on every call (MatchError) (#48)
## Bug
`FeedbackATron.Submitter.submit_batch/2` — a public API — raised
`MatchError` on **every** call with a non-empty issue list, crashing the
`Submitter` GenServer.
`handle_call({:submit_batch, ...})` maps over issues and matches the
inner `handle_call({:submit, ...})` against a bare `{:ok, id, result}`.
But `handle_call` returns a GenServer **`{:reply, {:ok, id, result},
state}` 3-tuple** — so the match always failed.
Found while running the suite during pipeline work (the existing test
`submitter_test.exs` `submit_batch/2 batch submission processes multiple
issues` was red).
## Fix
Destructure the reply payload: `{:reply, {:ok, id, result}, _new_state}
= handle_call(...)`.
## Verification
Previously-failing test now passes; **full suite green (139 tests, 0
failures)**.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 05d2d3b commit e20a24b
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
123 | 125 | | |
124 | 126 | | |
125 | 127 | | |
| |||
0 commit comments