Marius Ciepluch
8998697b4e
fix(contributor-scan): the MCP server answers a tool that stops the CLI and stays up (3.1, follow-up)
...
By the maintainer's decision of 2026-11-25, recorded in the handover: "McpServer.handle
catches Exception only, so a missing scan path raises SystemExit through it and ends the stdio
loop; openultrasast.scan and openultrasast.benchmark both take that path. One bad call would
become an error result for that call and the server would stay up."
`McpServer.handle` in src/openultrasast/mcp.py catches `SystemExit` beside `Exception` and
answers with the error it already builds for any exception a tool raises: `-32603` with
`SystemExit: scan path is not a directory: <path>`. The stdio loop reads on, answers the next
request and exits 0 at EOF; before, the process exited 1 with that message on stderr and nothing
on stdout. `openultrasast.benchmark` takes the same clause when the manifest names a source path
that does not exist. No other path changes: the notification return comes before the `try`, a
line that does not parse is answered in `serve`, and `cli.py:588` is the only `SystemExit` a tool
handler can reach (the independent reviewer's trace), raised before the configuration is loaded
and before a run directory is created.
"Error result" is read as that JSON-RPC error: the decision names `handle`, and the handover
keeps this channel apart from `isError: true`, which `_call_tool` builds for `McpToolError`. A
missing path therefore travels a different channel from a missing `path` argument or an
unsupported mode; that is left for the maintainer's menu, with one pre-existing gap the reviewer
found: a line that is valid JSON but not an object still ends the loop.
Tests: through `serve`, a tools/call for `openultrasast.scan` with a missing path followed by a
ping gives the error object and then the ping result, and `serve` returns 0; through `handle`,
the same call gives that error object. Both failed on the code as it was, each with the
`SystemExit` raised through the function it calls (the first in my run, the second in the
reviewer's, on a copy of the code before the change); the second pins that the catch sits in
`handle`, the public dispatch, where a catch in `serve` alone passes the first. The 23 test files
around the scan path and the MCP server pass (242 passed before the second test was added, and
`tests/test_mcp.py` 18 passed after); ruff, mypy, the three gates and compileall pass, and the
gates print what they printed before the change. The real `ousast mcp` process, fed the same two
lines, answered both and exited 0 with an empty stderr. An independent reviewer approved the
change in one round and proposed the second test.
2026-11-25 18:14:06 +01:00
..
2026-11-06 16:08:41 +01:00
2026-06-22 17:13:02 +02:00
2026-11-17 17:34:49 +01:00
2026-11-03 18:37:44 +01:00
2026-11-03 18:37:44 +01:00
2026-11-22 20:12:03 +01:00
2026-11-24 15:33:35 +01:00
2026-11-04 08:53:21 +01:00
2026-11-01 18:32:24 +01:00
2026-11-04 09:54:47 +01:00
2026-11-04 09:54:47 +01:00
2026-11-04 09:54:47 +01:00
2026-11-04 09:54:47 +01:00
2026-11-04 15:09:42 +01:00
2026-11-04 10:53:09 +01:00
2026-11-04 12:08:32 +01:00
2026-11-04 12:08:32 +01:00
2026-11-20 20:08:16 +01:00
2026-11-12 15:55:43 +01:00
2026-10-31 14:08:35 +01:00
2026-11-04 15:09:42 +01:00
2026-11-24 20:16:23 +01:00
2026-11-04 15:09:42 +01:00
2026-11-04 10:53:09 +01:00
2026-11-04 15:09:42 +01:00
2026-11-01 18:16:07 +01:00
2026-11-01 18:16:07 +01:00
2026-11-01 18:16:07 +01:00
2026-10-01 10:13:31 +02:00
2026-10-02 21:05:48 +02:00
2026-09-29 19:41:35 +02:00
2026-10-29 19:01:25 +01:00
2026-11-03 18:37:44 +01:00
2026-11-04 08:53:21 +01:00
2026-10-12 15:22:55 +02:00
2026-10-13 10:50:01 +02:00
2026-11-03 18:37:44 +01:00
2026-11-01 17:01:44 +01:00
2026-10-06 11:15:09 +02:00
2026-10-06 14:51:07 +02:00
2026-10-04 12:03:19 +02:00
2026-11-03 18:37:44 +01:00
2026-11-25 10:40:01 +01:00
2026-10-13 11:06:09 +02:00
2026-10-31 07:10:36 +01:00
2026-09-08 12:15:54 +02:00
2026-09-03 20:33:48 +02:00
2026-10-14 02:49:44 +02:00
2026-09-03 20:33:48 +02:00
2026-09-03 20:05:13 +02:00
2026-11-24 15:33:35 +01:00
2026-10-31 19:38:01 +01:00
2026-11-01 10:37:37 +01:00
2026-11-01 12:03:51 +01:00
2026-11-01 10:37:37 +01:00
2026-11-04 09:54:47 +01:00
2026-11-01 10:18:02 +01:00
2026-11-01 11:34:23 +01:00
2026-10-31 19:08:14 +01:00
2026-11-01 09:20:02 +01:00
2026-11-06 16:08:41 +01:00
2026-11-04 08:53:21 +01:00
2026-11-04 15:09:42 +01:00
2026-11-04 08:53:21 +01:00
2026-10-31 13:39:51 +01:00
2026-11-04 09:54:47 +01:00
2026-11-04 08:53:21 +01:00
2026-11-04 08:53:21 +01:00
2026-10-31 14:08:35 +01:00
2026-11-11 20:50:46 +01:00
2026-11-11 20:50:46 +01:00
2026-11-11 17:08:45 +01:00
2026-11-11 10:07:53 +01:00
2026-11-10 08:31:33 +01:00
2026-11-12 13:41:30 +01:00
2026-11-12 13:41:30 +01:00
2026-11-11 12:18:33 +01:00
2026-11-11 22:57:20 +01:00
2026-11-11 12:18:33 +01:00
2026-11-12 13:41:30 +01:00
2026-11-10 07:56:20 +01:00
2026-11-12 15:55:43 +01:00
2026-11-11 22:57:20 +01:00
2026-11-11 10:07:53 +01:00
2026-11-11 15:49:36 +01:00
2026-11-11 12:18:33 +01:00
2026-11-11 14:59:30 +01:00
2026-11-06 18:14:14 +01:00
2026-11-11 12:18:33 +01:00
2026-11-12 01:12:14 +01:00
2026-11-12 00:14:53 +01:00
2026-11-11 13:04:39 +01:00
2026-11-11 10:40:48 +01:00
2026-11-11 19:01:06 +01:00
2026-11-11 19:01:06 +01:00
2026-11-11 16:50:23 +01:00
2026-11-11 14:27:15 +01:00
2026-11-10 09:08:32 +01:00
2026-11-06 17:27:19 +01:00
2026-10-31 14:18:51 +01:00
2026-11-01 18:32:24 +01:00
2026-10-31 16:33:53 +01:00
2026-10-31 15:44:48 +01:00
2026-11-04 08:53:21 +01:00
2026-11-04 08:53:21 +01:00
2026-10-31 15:28:14 +01:00
2026-10-31 14:32:37 +01:00
2026-10-31 14:27:18 +01:00
2026-10-31 14:13:39 +01:00
2026-11-01 11:34:23 +01:00
2026-10-31 18:26:24 +01:00
2026-11-06 16:22:08 +01:00
2026-11-04 08:53:21 +01:00
2026-11-11 20:50:46 +01:00
2026-11-04 08:53:21 +01:00
2026-11-11 21:17:51 +01:00
2026-11-04 08:53:21 +01:00
2026-11-04 08:53:21 +01:00
2026-11-04 08:53:21 +01:00
2026-10-31 16:57:11 +01:00
2026-11-04 08:53:21 +01:00
2026-11-04 08:53:21 +01:00
2026-11-04 09:54:47 +01:00
2026-10-31 14:00:47 +01:00
2026-10-31 15:11:01 +01:00
2026-10-31 14:39:16 +01:00
2026-10-31 13:55:12 +01:00
2026-10-31 17:30:40 +01:00
2026-11-04 08:53:21 +01:00
2026-11-04 09:54:47 +01:00
2026-10-12 14:16:36 +02:00
2026-09-26 07:44:33 +02:00
2026-10-13 10:50:01 +02:00
2026-10-04 16:41:22 +02:00
2026-11-24 15:33:35 +01:00
2026-06-22 17:13:02 +02:00
2026-11-02 11:03:36 +01:00
2026-11-04 10:53:09 +01:00
2026-11-04 12:08:32 +01:00
2026-11-20 20:08:16 +01:00
2026-11-04 15:09:42 +01:00
2026-11-02 10:49:38 +01:00
2026-10-30 08:38:58 +01:00
2026-09-24 11:08:22 +02:00
2026-10-02 10:15:19 +02:00
2026-10-12 16:03:14 +02:00
2026-10-04 16:41:22 +02:00
2026-10-14 08:08:32 +02:00
2026-11-01 18:16:07 +01:00
2026-11-01 18:48:25 +01:00
2026-11-01 17:42:05 +01:00
2026-11-01 17:17:05 +01:00
2026-11-01 15:09:28 +01:00
2026-10-29 21:04:51 +01:00
2026-11-01 17:24:50 +01:00
2026-09-23 19:36:32 +02:00
2026-10-14 02:49:44 +02:00
2026-10-30 09:44:27 +01:00
2026-09-14 08:07:06 +02:00
2026-11-24 15:33:35 +01:00
2026-10-13 10:50:01 +02:00
2026-09-25 15:29:43 +02:00
2026-09-13 17:08:49 +02:00
2026-11-24 15:33:35 +01:00
2026-10-13 11:06:09 +02:00
2026-10-13 18:49:58 +02:00
2026-10-13 20:22:22 +02:00
2026-11-03 18:37:44 +01:00
2026-10-13 19:03:23 +02:00
2026-10-14 09:35:16 +02:00
2026-10-14 02:49:44 +02:00
2026-10-14 02:49:44 +02:00
2026-11-01 12:18:30 +01:00
2026-10-14 13:24:45 +02:00
2026-10-13 23:17:15 +02:00
2026-10-13 20:22:22 +02:00
2026-10-14 19:01:07 +02:00
2026-11-03 18:37:44 +01:00
2026-10-13 20:44:18 +02:00
2026-11-03 18:37:44 +01:00
2026-10-14 02:49:44 +02:00
2026-11-03 18:37:44 +01:00
2026-10-13 12:00:37 +02:00
2026-11-24 15:33:35 +01:00
2026-10-13 12:00:37 +02:00
2026-11-16 16:55:56 +01:00
2026-10-29 16:10:44 +01:00
2026-11-01 16:56:26 +01:00
2026-10-04 14:39:36 +02:00
2026-10-30 20:10:22 +01:00
2026-11-03 18:37:44 +01:00
2026-10-29 19:20:24 +01:00
2026-09-30 18:49:05 +02:00
2026-10-03 14:41:55 +02:00
2026-10-01 10:36:34 +02:00
2026-10-02 10:15:19 +02:00
2026-10-01 10:36:34 +02:00
2026-10-02 10:15:19 +02:00
2026-10-02 17:24:49 +02:00
2026-10-02 16:12:08 +02:00
2026-10-03 15:06:08 +02:00
2026-10-03 15:06:08 +02:00
2026-10-13 11:06:09 +02:00
2026-10-01 11:03:54 +02:00
2026-10-02 15:25:21 +02:00
2026-10-01 20:40:41 +02:00
2026-10-13 11:06:09 +02:00
2026-10-13 11:06:09 +02:00
2026-10-03 09:40:58 +02:00
2026-10-13 11:06:09 +02:00
2026-10-14 09:35:16 +02:00
2026-09-04 11:53:06 +02:00
2026-10-14 19:01:07 +02:00
2026-10-29 20:59:37 +01:00
2026-10-29 20:59:37 +01:00
2026-10-13 11:06:09 +02:00
2026-11-25 18:14:06 +01:00
2026-10-30 08:09:02 +01:00
2026-09-25 14:30:36 +02:00
2026-10-13 11:06:09 +02:00
2026-09-09 13:09:47 +02:00
2026-09-28 09:10:02 +02:00
2026-11-24 11:43:37 +01:00
2026-09-08 19:46:58 +02:00
2026-09-14 08:07:06 +02:00
2026-09-09 09:27:19 +02:00
2026-09-17 14:04:39 +02:00
2026-09-09 07:42:44 +02:00
2026-11-24 11:43:37 +01:00
2026-11-24 11:43:37 +01:00
2026-09-09 12:45:21 +02:00
2026-09-09 16:13:17 +02:00
2026-10-13 11:06:09 +02:00
2026-10-13 11:06:09 +02:00
2026-09-04 11:50:44 +02:00
2026-10-29 14:11:13 +01:00
2026-10-29 15:06:53 +01:00
2026-10-14 19:01:07 +02:00
2026-10-14 16:50:04 +02:00
2026-11-02 13:41:35 +01:00
2026-11-01 15:02:04 +01:00
2026-09-05 19:38:04 +02:00
2026-10-14 17:31:07 +02:00
2026-10-14 17:31:07 +02:00
2026-09-06 07:24:13 +02:00
2026-10-29 15:23:43 +01:00
2026-10-14 17:31:07 +02:00
2026-10-14 17:31:07 +02:00
2026-09-06 07:24:13 +02:00
2026-09-06 07:24:13 +02:00
2026-10-29 14:48:53 +01:00
2026-11-24 15:33:35 +01:00
2026-09-05 19:38:04 +02:00
2026-09-06 07:24:13 +02:00
2026-10-31 07:10:36 +01:00
2026-10-14 19:01:07 +02:00
2026-10-13 12:00:37 +02:00
2026-10-13 16:15:32 +02:00
2026-09-08 19:46:58 +02:00
2026-10-29 19:17:37 +01:00
2026-09-08 19:46:58 +02:00
2026-09-30 18:49:05 +02:00
2026-11-24 15:33:35 +01:00
2026-09-29 19:04:52 +02:00
2026-09-29 17:41:09 +02:00
2026-10-13 11:06:09 +02:00
2026-10-13 11:06:09 +02:00
2026-10-14 02:49:44 +02:00
2026-10-13 11:06:09 +02:00
2026-10-13 12:00:37 +02:00
2026-10-13 12:00:37 +02:00
2026-10-02 20:32:51 +02:00
2026-10-01 09:56:52 +02:00
2026-10-13 12:00:37 +02:00
2026-10-04 12:03:19 +02:00
2026-10-14 02:49:44 +02:00
2026-10-13 11:06:09 +02:00
2026-10-13 12:00:37 +02:00
2026-10-02 20:26:46 +02:00
2026-10-14 02:49:44 +02:00
2026-10-02 08:07:35 +02:00
2026-09-30 08:19:46 +02:00
2026-10-13 12:00:37 +02:00
2026-06-22 12:31:35 +02:00
2026-06-17 21:13:51 +02:00
2026-09-23 19:05:08 +02:00
2026-09-05 10:45:43 +02:00
2026-11-04 08:53:21 +01:00
2026-11-03 18:37:44 +01:00
2026-10-29 19:34:44 +01:00
2026-11-06 14:13:29 +01:00
2026-09-07 07:37:41 +02:00
2026-09-17 09:56:59 +02:00
2026-11-23 13:45:27 +01:00
2026-09-13 18:03:31 +02:00
2026-10-02 22:31:14 +02:00
2026-09-13 16:16:19 +02:00
2026-09-23 14:12:47 +02:00
2026-09-12 21:12:45 +02:00
2026-09-13 19:32:43 +02:00
2026-09-13 15:24:06 +02:00
2026-10-02 22:51:22 +02:00
2026-09-13 19:06:02 +02:00
2026-10-02 21:57:42 +02:00
2026-10-13 11:06:09 +02:00
2026-10-02 22:51:22 +02:00
2026-09-13 17:45:16 +02:00
2026-10-02 22:24:24 +02:00
2026-09-21 13:50:38 +02:00
2026-10-02 22:18:14 +02:00
2026-09-13 18:43:13 +02:00
2026-09-13 13:25:44 +02:00
2026-09-23 07:55:33 +02:00
2026-09-13 17:08:49 +02:00
2026-09-12 19:04:20 +02:00
2026-10-11 10:12:03 +02:00
2026-10-02 21:57:42 +02:00
2026-10-13 11:06:09 +02:00
2026-06-22 20:02:34 +02:00
2026-11-06 14:12:56 +01:00
2026-09-30 12:45:29 +02:00
2026-11-16 14:53:01 +01:00
2026-11-24 15:33:35 +01:00
2026-11-24 15:33:35 +01:00
2026-09-09 08:10:59 +02:00
2026-11-24 15:33:35 +01:00
2026-10-30 08:38:09 +01:00
2026-11-24 17:51:37 +01:00
2026-11-24 15:33:35 +01:00
2026-10-30 08:53:05 +01:00
2026-11-25 17:15:13 +01:00
2026-11-24 15:33:35 +01:00
2026-11-24 15:33:35 +01:00
2026-06-22 15:41:17 +02:00
2026-10-05 21:07:58 +02:00
2026-11-24 20:16:23 +01:00
2026-10-05 14:26:43 +02:00
2026-10-06 17:07:24 +02:00
2026-10-13 11:06:09 +02:00
2026-11-01 12:38:49 +01:00
2026-10-13 10:50:01 +02:00
2026-10-06 14:37:58 +02:00
2026-10-06 11:15:09 +02:00
2026-10-09 14:03:30 +02:00
2026-10-05 20:40:13 +02:00
2026-10-14 07:54:09 +02:00
2026-10-14 07:54:09 +02:00
2026-10-05 17:26:06 +02:00
2026-10-14 07:54:09 +02:00
2026-10-06 14:37:58 +02:00
2026-10-06 11:15:09 +02:00
2026-11-24 20:16:23 +01:00
2026-11-24 20:16:23 +01:00
2026-10-29 15:33:18 +01:00
2026-10-14 19:01:07 +02:00
2026-10-14 09:35:16 +02:00
2026-11-24 15:33:35 +01:00
2026-09-04 15:07:35 +02:00
2026-11-24 15:33:35 +01:00
2026-09-30 18:49:05 +02:00
2026-10-13 13:10:19 +02:00
2026-10-14 14:47:08 +02:00
2026-09-04 11:49:44 +02:00
2026-10-13 10:50:01 +02:00
2026-10-13 12:43:02 +02:00
2026-10-13 10:34:57 +02:00
2026-10-29 15:45:29 +01:00
2026-11-24 14:25:30 +01:00
2026-11-24 15:33:35 +01:00
2026-10-13 21:46:45 +02:00
2026-09-06 12:39:55 +02:00
2026-10-10 17:10:19 +02:00
2026-10-10 07:54:49 +02:00
2026-10-05 08:14:57 +02:00
2026-10-10 16:33:29 +02:00
2026-10-04 19:17:35 +02:00
2026-10-14 08:42:25 +02:00
2026-10-10 07:54:49 +02:00
2026-10-04 19:17:35 +02:00
2026-10-05 08:14:57 +02:00
2026-10-04 20:19:14 +02:00
2026-11-03 18:37:44 +01:00
2026-10-04 20:19:14 +02:00
2026-10-08 10:26:11 +02:00
2026-11-23 20:15:21 +01:00
2026-11-23 02:50:12 +01:00
2026-11-21 19:28:10 +01:00
2026-11-21 19:28:10 +01:00
2026-11-23 20:15:09 +01:00
2026-11-17 17:34:49 +01:00
2026-11-17 16:47:55 +01:00
2026-11-17 14:37:20 +01:00
2026-11-17 13:59:33 +01:00
2026-11-23 09:27:41 +01:00
2026-11-22 10:25:59 +01:00
2026-11-23 09:27:41 +01:00
2026-11-23 11:40:09 +01:00
2026-11-16 15:51:29 +01:00
2026-11-20 20:08:21 +01:00
2026-11-17 16:11:24 +01:00
2026-11-16 17:31:05 +01:00
2026-11-23 21:54:42 +01:00
2026-11-23 09:27:41 +01:00
2026-11-16 17:08:05 +01:00
2026-11-23 09:27:41 +01:00
2026-11-23 11:40:09 +01:00
2026-11-23 09:27:41 +01:00
2026-11-16 17:41:41 +01:00
2026-11-16 15:51:29 +01:00
2026-11-23 02:50:12 +01:00
2026-11-17 20:34:11 +01:00
2026-11-17 20:34:11 +01:00
2026-11-17 13:35:45 +01:00
2026-11-21 12:41:42 +01:00
2026-11-16 16:06:01 +01:00
2026-11-17 22:42:00 +01:00
2026-11-21 19:28:10 +01:00
2026-11-21 19:28:10 +01:00
2026-11-16 18:09:48 +01:00
2026-11-23 09:27:41 +01:00
2026-11-23 09:27:41 +01:00
2026-11-16 18:41:49 +01:00
2026-11-17 13:07:06 +01:00
2026-11-17 13:07:06 +01:00
2026-11-23 13:31:01 +01:00
2026-11-23 09:27:41 +01:00
2026-11-23 11:40:09 +01:00
2026-11-23 11:40:09 +01:00
2026-11-23 20:15:28 +01:00
2026-11-24 07:41:26 +01:00
2026-11-21 13:39:38 +01:00
2026-11-20 20:25:08 +01:00
2026-11-21 19:28:10 +01:00
2026-11-23 13:31:01 +01:00
2026-11-16 15:23:52 +01:00
2026-11-23 09:27:41 +01:00
2026-11-21 19:28:10 +01:00
2026-11-21 19:28:10 +01:00
2026-10-13 20:47:23 +02:00
2026-11-24 15:33:35 +01:00
2026-10-29 19:11:30 +01:00
2026-11-23 21:54:42 +01:00
2026-11-23 09:27:41 +01:00
2026-11-24 07:41:26 +01:00