fix(diagnosis): ignore unexpected messages in the diagnosis queue #29

Manually merged
jfro merged 1 commit from fix/14-queue-catch-all into main 2026-11-01 17:59:02 +00:00
Owner

Closes #14.

Diagnosis.Queue had no catch-all handle_info/2, so any stray message crashed it, taking its running diagnoses with it. mix test showed one: a FunctionClauseError on {:fake_ai_run, ...}.

  • The queue logs unexpected messages (Logger.warning, message truncated) and ignores them.
  • The leak: FakeProvider.run/2 sends {:fake_ai_run, request} to every $callers process, and the queue is a caller of its diagnosis tasks. It now skips the queue.
  • queue_test.exs: a stray message is logged and the queue stays up; a full diagnosis run sends the queue nothing unexpected (fails without the FakeProvider fix).

mix precommit: 626 pass, and the :fake_ai_run FunctionClauseError is gone from the test log.

Closes #14. `Diagnosis.Queue` had no catch-all `handle_info/2`, so any stray message crashed it, taking its running diagnoses with it. `mix test` showed one: a `FunctionClauseError` on `{:fake_ai_run, ...}`. - The queue logs unexpected messages (`Logger.warning`, message truncated) and ignores them. - The leak: `FakeProvider.run/2` sends `{:fake_ai_run, request}` to every `$callers` process, and the queue is a caller of its diagnosis tasks. It now skips the queue. - `queue_test.exs`: a stray message is logged and the queue stays up; a full diagnosis run sends the queue nothing unexpected (fails without the FakeProvider fix). `mix precommit`: 626 pass, and the `:fake_ai_run` FunctionClauseError is gone from the test log.
jfro added this to the v1.0 milestone 2026-11-01 17:36:00 +00:00
fix(diagnosis): ignore unexpected messages in the diagnosis queue
All checks were successful
CI / test (pull_request) Successful in 23s
7bafb48c1b
Diagnosis.Queue had no catch-all handle_info, so a stray message crashed
it along with the diagnoses it was running. It now logs and ignores them.
The test FakeProvider no longer sends {:fake_ai_run, _} to the queue,
which was the stray message mix test logged.

Closes #14
Author
Owner

Review (Nye) at 7bafb48: ready. Catch-all handle_info logs and ignores, placed after the task-reply/DOWN/unpause clauses; the FakeProvider leak (the actual source of {:fake_ai_run, ...} hitting the queue) is fixed and tested. mix precommit: 626 pass. CI green.

Review (Nye) at 7bafb48: ready. Catch-all handle_info logs and ignores, placed after the task-reply/DOWN/unpause clauses; the FakeProvider leak (the actual source of {:fake_ai_run, ...} hitting the queue) is fixed and tested. mix precommit: 626 pass. CI green.
jfro manually merged commit af9381b15e into main 2026-11-01 17:59:02 +00:00
Sign in to join this conversation.
No description provided.